cobalt_logger 1.7.0
cobalt_logger: ^1.7.0 copied to clipboard
Cobalt adapter for package:logger — sends the DI graph's events to a Logger with its pretty console output.
cobalt_logger #
Adapter for package:logger — the one with the boxed console output — for Cobalt.
Not
cobalt_logging. That adapts package:logging, the dart.dev package whose name differs by one letter.
final scope = await CobaltApplication.start(
root: const AppScope(),
observers: [CobaltLogObserver(CobaltLoggerSink())],
);
Unlike package:logging, this one prints by itself: the default Logger already has a console
output and PrettyPrinter. Pass your own if you have configured one.
Levels #
Cobalt's five map one-to-one onto trace, debug, info, warning, error. None of them can
land on Level.all, Level.off or Level.nothing, which matters because Logger.log throws
ArgumentError on those — a test in this package pins it.