Skip to main content

cobalt_logger 1.7.0 copy "cobalt_logger: ^1.7.0" to clipboard
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.

example/example.md

cobalt_logger example #

Writes Cobalt's events into package:logger.

import 'package:cobalt/cobalt.dart';
import 'package:cobalt_logger/cobalt_logger.dart';

final scope = await CobaltApplication.start(
  root: const AppScope(),
  observers: [CobaltLogObserver(CobaltLoggerSink())],
);

Pass your own Logger if the defaults do not suit:

CobaltLoggerSink(logger: Logger(printer: PrettyPrinter()))

Do not confuse this package with cobalt_logging, one letter apart, which adapts dart.dev's package:logging instead.

0
likes
160
points
1.54k
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Cobalt adapter for package:logger — sends the DI graph's events to a Logger with its pretty console output.

Repository (GitHub)
View/report issues
Contributing

Topics

#dependency-injection #di #logging #observability

License

MIT (license)

Dependencies

cobalt, logger

More

Packages that depend on cobalt_logger