onRecordCallback method

Future<void> onRecordCallback(
  1. LogRecord record
)

Useful shorthand to attch to the logger stream: Logger.root.onRecord.listen(myDatadogLogger.onRecordCallback);

Implementation

Future<void> onRecordCallback(LogRecord record) => log(
      record.message,
      record.level,
      attributes: {'loggerName': record.loggerName},
    );