Last updated:
0 purchases
fox logging
Fox Logging #
A package containing some helpful extensions for the standard logging package.
It provides a flow to make logging more structured by introducing sinks and
formatters.
Sink #
A sink write a log entry to some place, like the console, file, database,...
final sink = IoLogSink(myFormatter);
copied to clipboard
Formatter #
Formatters format a LogRecord to a String in a certain way. This can be a
pretty, verbose or simple, concise log. Or a complete custom implementation.
final simpleFormatter = SimpleFormatter();
copied to clipboard
Small example #
final logger = Logger('Simple');
final sink = IoLogSink(SimpleFormatter())
..listenTo(logger.onRecord);
copied to clipboard
Images below show the SimpleFormatter and PrettyFormatter when using the PrintSink.
SimpleFormatter:
PrettyFormatter:
For a more detailed example check out the example.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.