PrefixPrinter class
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:
PrefixPrinter(PrettyPrinter());
Would prepend "DEBUG" to every line in a debug log. You can supply parameters for a custom message for a specific log level.
- Inheritance
-
- Object
- LogPrinter
- PrefixPrinter
Constructors
- PrefixPrinter(LogPrinter _realPrinter, {String? debug, String? trace, @Deprecated('[verbose] is being deprecated in favor of [trace].') dynamic verbose, String? fatal, @Deprecated('[wtf] is being deprecated in favor of [fatal].') dynamic wtf, String? info, String? warning, String? error})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
destroy(
) → Future< void> -
inherited
-
init(
) → Future< void> -
inherited
-
log(
LogEvent event) → List< String> -
Is called every time a new LogEvent is sent and handles printing or
storing the message.
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