logging_appenders 1.3.1 copy "logging_appenders: ^1.3.1" to clipboard
logging_appenders: ^1.3.1 copied to clipboard

Logging appenders for the dart logging package for print, file and remote (logz, loki, graylog (gelf)).

example/lib/main.dart

import 'package:logging/logging.dart';
import 'package:logging_appenders/logging_appenders.dart';

final _logger = Logger('example');

void main() {
  Logger.root.level = Level.ALL;
  final appender = PrintAppender.setupLogging(stderrLevel: Level.SEVERE);
//  Equal to:
//  final appender = PrintAppender(formatter: const ColorFormatter())
//    ..attachToLogger(Logger.root);
  _logger.fine('Lorem ipsum');
  _logger.info('An important info message');
  _logger.severe('This is bad.');
  _logger.shout('This is just impolite');

  // optionally dispose of the appender.
  appender.dispose();
}
38
likes
160
pub points
93%
popularity
screenshot

Publisher

verified publishercodeux.design

Logging appenders for the dart logging package for print, file and remote (logz, loki, graylog (gelf)).

Repository (GitHub)
View/report issues

Topics

#logging #error #console

Documentation

API reference

License

MIT (license)

Dependencies

clock, dio, intl, logging, meta

More

Packages that depend on logging_appenders