logger library
Classes
- AdvancedFileOutput
- Accumulates logs in a buffer to reduce frequent disk, writes while optionally switching to a new log file if it reaches a certain size.
- AnsiColor
- This class handles colorizing of terminal output.
- ConsoleOutput
- Default implementation of LogOutput.
- DateTimeFormat
- DevelopmentFilter
-
Prints all logs with
level >= Logger.level
while in development mode (eg whenassert
s are evaluated, Flutter calls this debug mode). - FileOutput
- HybridPrinter
- A decorator for a LogPrinter that allows for the composition of different printers to handle different log messages. Provide it's constructor with a base printer, but include named parameters for any levels that have a different printer:
- LogEvent
- LogFilter
- An abstract filter of log messages.
- LogfmtPrinter
- Outputs a logfmt message:
- Logger
- Use instances of logger to send log messages to the LogPrinter.
- LogOutput
- Log output receives a OutputEvent from LogPrinter and sends it to the desired destination.
- LogPrinter
- An abstract handler of log events.
- MemoryOutput
- Buffers OutputEvents.
- MultiOutput
- Logs simultaneously to multiple LogOutput outputs.
- OutputEvent
- PrefixPrinter
- A decorator for a LogPrinter that allows for the prepending of every line in the log output with a string for the level of that log. For example:
- PrettyPrinter
- Default implementation of LogPrinter.
- ProductionFilter
-
Prints all logs with
level >= Logger.level
even in production. - SimplePrinter
- Outputs simple log messages:
- StreamOutput
Enums
Typedefs
- DateTimeFormatter = String Function(DateTime time)
- LogCallback = void Function(LogEvent event)
- OutputCallback = void Function(OutputEvent event)