ConsoleHandler class final
Human-readable lines; warnings and above go to err.
Without out and err the lines go to stdout and stderr through a
bounded, non-blocking queue (LogLineQueue): logging never blocks the
event loop on a pipe nobody reads, and past 8 MiB waiting lines are
dropped and counted (log_lines_dropped_total). close waits (up to
5 s) for the lines already queued.
- Implemented types
Constructors
- ConsoleHandler({StringSink? out, StringSink? err, bool showChannel = false})
-
Writes to stdout, errors to stderr;
showChannelprefixes the channel.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showChannel → bool
-
Whether each line starts with the channel.
final
Methods
-
close(
) → Future< void> -
Flushes and closes the handler.
override
-
handle(
LogRecord record) → void -
Writes
record.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