quick_log 0.1.1 copy "quick_log: ^0.1.1" to clipboard
quick_log: ^0.1.1 copied to clipboard

outdated

An easy to use and extendable logging package for Dart. Especially useful for use in libraries, as it allows application to control logging from the imported libraries.

An easy to use and extendable logging package for Dart. Especially useful for use in libraries, as it allows application to control logging from the imported libraries.

Console Printer Output

Usage #

A simple usage example:

import 'package:quick_log/quick_log.dart';

void main() {
  const log = Logger('LogExample');

  log.debug('this is a debug message');
  log.info('this is an info message');
}

Configuring logger output:

import 'package:quick_log/quick_log.dart';

void main() {
  const log = Logger('LogExample');

  Logger.writer = ConsolePrinter(minLevel: LogLevel.info);

  log.debug('this is a debug message');
  log.info('this is an info message');
}

Ignoring logs

import 'package:quick_log/quick_log.dart';

class ExampleLogger extends Logger {
  const ExampleLogger(String name) : super(name, 'ExampleLogger');
}

void main() {
  const log = ExampleLogger('LogExample');

  Logger.writer = ConsolePrinter(onlyNamespace: []);
  // Or
  Logger.writer = ConsolePrinter(exceptNamespace: [log.namespace]);

  // These messages won't be printed
  log.debug('this is a debug message');
  log.info('this is an info message');
}

Features #

  • Similar to Dart logging package and logging libraries in other languages
  • Completely configurable and extendable Logger and LogWriter

Please file feature requests and bugs at the issue tracker.

19
likes
0
pub points
85%
popularity

Publisher

verified publishermuha.dev

An easy to use and extendable logging package for Dart. Especially useful for use in libraries, as it allows application to control logging from the imported libraries.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

path, rxdart

More

Packages that depend on quick_log