log_tanker 0.0.1 copy "log_tanker: ^0.0.1" to clipboard
log_tanker: ^0.0.1 copied to clipboard

\ Logging package for flutter and dart focused on very fast set up. Entirely customizable and easy to use.

Log Tanker #

Logging package for flutter and dart focused on very fast set up. Entirely customizable and easy to use.

Features #

  • ✅ Include log and ensure features
  • ✅ Right message on console or on integrated flutter dev tools
  • ✅ Error log and ensure are break point
  • ✅ Log with different categories and severity
  • ✅ Personalized log message for each category
  • ✅ Export log to json
  • ✅ Export log to file
  • ❌ Listen all your log via stream
  • ❌ No cost for use in production
  • ❌ Complete documentation
  • ✅ Complete api reference
  • ❌ Complete example

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.

2
likes
150
points
46
downloads

Publisher

unverified uploader

Weekly Downloads

\ Logging package for flutter and dart focused on very fast set up. Entirely customizable and easy to use.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

ansicolor

More

Packages that depend on log_tanker