debugx 1.0.0 copy "debugx: ^1.0.0" to clipboard
debugx: ^1.0.0 copied to clipboard

Small, easy to use and extensible logger which prints beautiful logs.

example/main.dart

import 'package:debugx/logger.dart';

var logger = Logger(
  printer: PrettyPrinter(),
);

var loggerNoStack = Logger(
  printer: PrettyPrinter(methodCount: 0),
);

void main() {
  print(
      'Run with either `dart example/main.dart` or `dart --enable-asserts example/main.dart`.');
  demo();
}

void demo() {
  logger.d('Log message with 2 methods');

  loggerNoStack.i('Info message');

  loggerNoStack.w('Just a warning!');

  logger.e('Error! Something bad happened', error: 'Test Error');

  loggerNoStack.t({'key': 5, 'value': 'something'});

  Logger(printer: SimplePrinter(colors: true)).t('boom');
}
1
likes
155
points
18
downloads

Publisher

verified publishernetronk.com

Weekly Downloads

Small, easy to use and extensible logger which prints beautiful logs.

Repository (GitHub)

Topics

#cli #logging #debugx #debug

Documentation

API reference

License

MIT (license)

More

Packages that depend on debugx