filterable_logger

Last updated:

0 purchases

filterable_logger Image
filterable_logger Images
Add to Cart

Description:

filterable logger

Filterable Logger #

A filterable logger with colored output for different log level.
Features #

Log level definition is based on dart logging package.

Level.OFF
Level.SHOUT
Level.SEVERE
Level.WARNING
Level.INFO
Level.CONFIG
Level.FINE
Level.FINER
Level.FINEST
copied to clipboard

Colored output




Filterable
To suppress unuseful log info, tags filter will work.


// Set tags filter
FilterableLogger.setup(tagsFilter: <Object>['Network']);

// This will be printed.
FilterableLogger.info('Message', tags: <Object>['Network', 'Debug']);

// This will not be printed
FilterableLogger.info('Message', tags: <Object>['Debug']);
copied to clipboard
Usage #
// Basic usage
FilterableLogger.shout('This is \'SHOUT\' log.');

FilterableLogger.severe('This is \'SEVERE\' log.');

FilterableLogger.warning('This is \'WARNING\' log.');

FilterableLogger.info('This is \'INFO\' log.');

FilterableLogger.config('This is \'CONFIG\' log.');

FilterableLogger.fine('This is \'FINE\' log.');

FilterableLogger.finer('This is \'FINER\' log.');

FilterableLogger.finest('This is \'FINEST\' log.');
copied to clipboard
// Logger configurations
FilterableLogger.setup(
level: Level.INFO,
showTraceInfo: true,
traceLevel: 3,
format: (LogRecord record) {
return 'Customized log format';
},
tagsFilter: <Object>['Filters'],
afterLogging: (LogRecord record){
// Callback after log successfully
},
);
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.