ConsoleOutput class
Pretty-prints log records to stdout with optional ANSI colors.
Constructors
- ConsoleOutput({bool colored = true, ConsoleFormat format = ConsoleFormat.pretty, String? scopeFilter})
- Creates a ConsoleOutput with optional color and format settings.
Properties
- colored → bool
-
Whether to use ANSI color codes.
final
- format → ConsoleFormat
-
Output format.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAsync → bool
-
Whether this output uses async writing.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scopeFilter → String?
-
Optional scope filter. If non-null, this output only receives records
whose scope starts with this prefix.
final
Methods
-
dispose(
) → void -
Clean up resources.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
write(
LogRecord record) → void -
Write a log record synchronously.
override
-
writeAsync(
LogRecord record) → Future< void> -
Write a log record asynchronously.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
escapeLine(
String text) → String -
textwith everyrpcIsUnsafeCodePointescaped, so one record stays one line and reads as written; other non-ASCII text is kept.