belatuk_pretty_logging 6.2.0 copy "belatuk_pretty_logging: ^6.2.0" to clipboard
belatuk_pretty_logging: ^6.2.0 copied to clipboard

Standalone helper for colorful logging output, using pkg:io AnsiCode.

Belatuk Petty Logging #

Pub Version (including pre-releases) Null Safety Gitter License

Replacement of package:pretty_logging with breaking changes to support NNBD.

Standalone helper for colorful logging output, using pkg:io AnsiCode.

Installation #

In your pubspec.yaml:

dependencies:
  belatuk_pretty_logging: ^6.1.0

Usage #

Basic usage is very simple:

myLogger.onRecord.listen(prettyLog);

However, you can conditionally pass logic to omit printing an error, provide colors, or to provide a custom print function:

var pretty = prettyLog(
  logColorChooser: (_) => red,
  printFunction: stderr.writeln,
  omitError: (r) {
    var err = r.error;
    return err is AngelHttpException && err.statusCode != 500;
  },
);
myLogger.onRecord.listen(pretty);
0
likes
160
pub points
71%
popularity

Publisher

verified publisherdukefirehawk.com

Standalone helper for colorful logging output, using pkg:io AnsiCode.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

io, logging

More

Packages that depend on belatuk_pretty_logging