HybridPrinter class
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:
HybridPrinter(PrettyPrinter(), debug: SimplePrinter());
Will use the pretty printer for all logs except Level.debug logs, which will use SimplePrinter().
- Inheritance
-
- Object
- LogPrinter
- HybridPrinter
Constructors
- HybridPrinter(LogPrinter realPrinter, {LogPrinter? debug, LogPrinter? verbose, LogPrinter? wtf, LogPrinter? info, LogPrinter? warning, LogPrinter? error, LogPrinter? success})
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(
) → void -
inherited
-
init(
) → 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