Log Tanker
Logging package for flutter and dart focused on very fast set up. Entirely customizable and easy to use.
Features
x
Include log and ensure featuresx
Right message on console or on integrated flutter dev toolsx
Error log and ensure are break pointx
Log with different categories and severityx
Personalized log message for each categoryx
Export log to jsonx
Export log to filex
Complete api reference
Getting Started with Log_Tanker
Utilize the QuickLog static class for rapid logging operations:
setState(() {
_counter++;
QuickLog.v("Counter incremented to $_counter");
QuickLog.d("Counter incremented to $_counter");
QuickLog.i("Counter incremented to $_counter");
QuickLog.w("Counter incremented to $_counter");
});
For conditional logging and debugging, QuickLog offers the ensure method :
setState(() {
_counter++;
// In debug mode, the following will trigger a debugger breakpoint
QuickLog.ensure(_counter < 5, message: "Counter must be less than 5");
});
For more personalized logging, instantiate your own Logger object :
Logger myLogger = Logger(loggerName: "MyLogger");
// ...
setState(() {
_counter++;
// Use your custom logger
myLogger.v("Counter incremented to $_counter"); // Verbose log
myLogger.d("Counter incremented to $_counter"); // Debug log
myLogger.i("Counter incremented to $_counter"); // Info log
myLogger.w("Counter incremented to $_counter"); // Warning log
// Triggers a debugger breakpoint in debug mode if the condition is false
myLogger.ensure(_counter < 5, message: "Counter must be less than 5");
});
Project Example
For complete demonstrations, refer to the following examples:
Additional Information
If you encounter any problems, feel free to create an Issue. You are also welcome to participate in discussions and contribute if you wish.
Libraries
- log_tanker
- The log_tanker Library