logger 0.2.0 copy "logger: ^0.2.0" to clipboard
logger: ^0.2.0 copied to clipboard

outdated

A simple, yet efficient structured logger for Dart.

Logger #

A simple, yet efficient structured logger for Dart.

Installation #

$ pub get logger

Package uses brand new features from Dart 2.0 which is currently in public beta, in order to use this package make sure that you add --preview-dart-2 to flags when running on Dart VM

Quick Start #

import 'package:logger/logger.dart' show Logger, Tracer;
import 'package:logger/handlers.dart' show CliHandler;

final logger = Logger('example')..addHandler(CliHandler());

void main() {
  final Tracer tracer = logger.withFields({
    'env': 'development',
    'port': 3000
  }).trace('App starts...');
  
  // stuff...
  
  tracer.stop('App started!');
}

Find out detailed APIs by the following link.

License #

The source is released under the terms of MIT license.

3269
likes
0
pub points
100%
popularity

Publisher

verified publishersourcehorizon.org

A simple, yet efficient structured logger for Dart.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on logger