PrettyPrinter class
Format log and add emoji to represent the color.
showColors - default:false This uses ANSI escape characters and it will be visible only in terminal. IDE-s mostly don't support them and you will only end up with log that has weird prefix and suffix.
Format: EMOJI TIME LOG PRIORITY LOGGER NAME - CLASS NAME - LOG MESSAGE
- Inheritance
-
- Object
- LogPrinter
- PrettyPrinter
Constructors
- PrettyPrinter.new({bool? showColors})
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showColors → bool?
-
final
Methods
-
levelColor(
LogLevel level) → AnsiColor? -
levelPrefix(
LogLevel level) → String? -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onLog(
LogRecord record) → void -
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited