PatternLogFormatter class

A formatter that can be customized with a pattern.

The pattern can include the following placeholders:

  • {level}: The log level.
  • {message}: The log message.
  • {time}: The timestamp in HH:MM:SS format.
  • {date}: The date in YYYY-MM-DD format.
Implemented types

Constructors

PatternLogFormatter([String pattern = '[{time}] {level}: {message}'])
Creates a new PatternLogFormatter with the given pattern.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
pattern String
The pattern to use for formatting log entries.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

format(LogEntry entry) String
Formats a log entry for output.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited