shouldLog method

  1. @override
bool shouldLog(
  1. LogEvent event
)
override

Is called every time a new log message is sent and decides if it will be printed or canceled.

Returns true if the message should be logged.

Implementation

@override
bool shouldLog(LogEvent event) {
  var shouldLog = false;
  assert(() {
    if (event.level.index >= level!.index) {
      shouldLog = true;
    }
    return true;
  }());
  return shouldLog;
}