Small, extensible logger that prints readable logs for Dart and Flutter
open sourceMITfree
logger is a small, extensible logging package for Dart and Flutter that prints colourful, formatted log output, inspired by the logger library for Android. You create a Logger and log at trace, debug, info, warning, error and fatal levels, passing a message or any object (a list, a map or a set) and optionally an error and stack trace. A LogFilter decides what is shown (by default only in debug mode), a LogPrinter such as PrettyPrinter formats each event with method counts, colours, emojis and timestamps, and a LogOutput sends it to the console or anywhere else. It is published on pub.dev.
Problems it solves
- readable, colourful log output in my Flutter app
- hide debug logs from my Dart app in release builds
- log errors with stack traces in a Flutter app
Features
- log levels from trace to fatal
- pretty printer with stack traces, colours and emojis
- pluggable filters, printers and outputs
- logs errors and stack traces
Alternatives
The same job
These do what logger does.
- logging Debug and error logging APIs for Dart
