galileo_pretty_logging

Last updated:

0 purchases

galileo_pretty_logging Image
galileo_pretty_logging Images
Add to Cart

Description:

galileo pretty logging

pretty_logging #

Standalone helper for colorful logging output, using pkg:io AnsiCode.
Installation #
In your pubspec.yaml:
dependencies:
pretty_logging: 1.0.0
copied to clipboard
Usage #
Basic usage is very simple:
myLogger.onRecord.listen(prettyLog);
copied to clipboard
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);
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.