stump

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

stump

Stump is a Flutter logger inspired by Timber.
It provides a set of static methods to easily log messages and the support to multiple and custom printers.
Getting started #
Initialize Stump by adding StumpPrinter implementations to it in the main() of your app.
The library come with a printer implementation, DebugPrinter, that prints messages by using debugPrint, with automatic tag inference and color based on log level.
You can add as many StumpPrinter as you want.
Example: basic setup #
Stump.addPrinter(DebugPrinter());
copied to clipboard
Example: DebugPrinter in debug only (no logs in release) #
if (kDebugMode) {
Stump.addPrinter(DebugPrinter());
}
copied to clipboard
Example: DebugPrinter in debug and a custom printer in release #
if (kDebugMode) {
Stump.addPrinter(DebugPrinter());
} else {
Stump.addPrinter(MyCustomPrinter());
}
copied to clipboard
Usage #
Stump.i('My info log message');
Stump.d('My debug log message');
Stump.w('My warning log message');
Stump.e('My error log message');
copied to clipboard
The result, if launched with DebugPrinter installed, will be similar to:

You can optionally provide error and stacktrace to errors:
try {
throw 'A very bad error';
} catch (error, stackTrace) {
Stump.e('My error log message', error: error, stackTrace: stackTrace);
}
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.