init method
Implementation
void init() {
_logger = Logger("Argus2638");
if (useStdIO) {
listen((LogRecord record) => print(
"${record.time} | ${record.level} >> ${record.message}"));
}
// this makes sure we capture all of the data before the app runs or any states that are not yet initted.
// thus make sure to call init before the app itself starts!!
listen((LogRecord record) {
if (ConsoleStateComponent.internalConsoleBuffer.length >=
Shared.MAX_LOG_LENGTH) {
ConsoleStateComponent.internalConsoleBuffer.clear();
}
ConsoleStateComponent.internalConsoleBuffer
.add(stdIOPrettifier.call(record));
});
}