ComposablePrinter class
A LogPrinter that formats records through a composable decorator pipeline.
Construction
decorators are applied to a fresh LogStyle at construction time. The resulting style is immutable for the lifetime of the printer — mutation after construction is not supported.
Pipeline
LogEntry
→ ContentExtractor.extract() (parse sections, className, methodName)
→ StyleResolver.resolve*() (map LogStyle flags → ResolvedStyle)
→ LogRenderer.render() (assemble lines)
Output
- Implemented types
Constructors
-
ComposablePrinter(List<
LogDecorator> decorators, {int methodCount = 10, int? errorMethodCount, List<String> excludePaths = const [], bool showAsyncGaps = false, bool? suppressTypeNames, LogOutput output = print})
Properties
-
decorators
→ List<
LogDecorator> -
The decorators applied at construction to build style.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- output → LogOutput
-
Sink for formatted lines. Defaults to print.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style ↔ LogStyle
-
The merged LogStyle produced by applying all decorators.
latefinal
Methods
-
dispose(
) → void -
Releases any resources held by this printer (timers, file
handles, network sockets, etc.).
override
-
format(
LogEntry entry) → List< String> -
Formats
entryinto a flat list of output lines without emitting them. -
log(
LogEntry entry) → void -
Emits
entryto this printer's destination.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