log method

  1. @override
void log(
  1. int level,
  2. dynamic message
)

Create a new log record in this logger.

Implementation

@override
void log(int level, message) {
  if (level <= logLevel) {
    StackTrace? stackTrace;

    if (recordStackTraces) {
      stackTrace = StackTrace.current;
    }

    var record = LogRecord(
        message: message,
        level: level,
        scope: fullName,
        stackTrace: stackTrace);

    _sink.add(record);
  }
}