onRecordCallback method
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},
);