angel3_pretty_logging 3.0.1 copy "angel3_pretty_logging: ^3.0.1" to clipboard
angel3_pretty_logging: ^3.0.1 copied to clipboard

discontinuedreplaced by: belatuk_pretty_logging
outdated

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

pretty_logging #

version Null Safety

License

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

Installation #

In your pubspec.yaml:

dependencies:
  angel3_pretty_logging: ^3.0.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);
1
likes
0
pub points
0%
popularity

Publisher

verified publisherdukefirehawk.com

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

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

io, logging

More

Packages that depend on angel3_pretty_logging