log method Null safety
- LogEvent event
override
Is called every time a new LogEvent is sent and handles printing or storing the message.
Implementation
@override
List<String> log(LogEvent event) {
AnsiColor? color = PrettyPrinter.levelColors[event.level];
var logResult = color!(
// ignore: lines_longer_than_80_chars
'[$className] ${DateTime.now()} - ${(event.level).toString().toUpperCase().split('.')[1]} - ${event.message}');
OutputEvent output = OutputEvent(event.level, [logResult]);
memory.output(output);
return [logResult];
}