enable method
Enables Nitro logging in one call.
NitroConfig.instance.enable(); // warning + 16 ms threshold
NitroConfig.instance.enable(NitroLogLevel.verbose); // full trace
NitroConfig.instance.enable(NitroLogLevel.error); // errors only, no timing
level— log verbosity to activate (defaults to NitroLogLevel.warning).slowCallThresholdMs— emit a warning for anycallAsyncthat exceeds this many milliseconds. Pass0to suppress slow-call warnings even when logging is enabled. Defaults to16(one frame at 60 fps).
Implementation
void enable({
NitroLogLevel level = NitroLogLevel.warning,
int slowCallThresholdMs = 16,
}) {
logLevel = level;
slowCallThresholdUs = slowCallThresholdMs * 1000;
if (level == NitroLogLevel.verbose) debugMode = true;
}