SimplePrinter class final

Simple printer that outputs basic, compact log messages in a single line.

Ideal for minimal output needs such as CLI tools, performance-focused apps, or when logs need to remain readable in raw text or terminal formats.

Configuration allows showing log level, timestamp, tag, errors, etc.

Inheritance

Constructors

SimplePrinter({LogConfig? config})
Simple printer that outputs basic, compact log messages in a single line.

Properties

config → LogConfig
Logging configuration that controls formatting details like whether to show timestamps, emojis, tags, etc.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

extractStack(StackTrace? stackTrace, List<String> excludePaths) → List<String>
Extracts the stack trace from a LogRecord.
inherited
getStepValue(LogStep step, LogRecord record) → String?
Extracts the string representation of the given LogStep from a LogRecord.
override
levelColor(LogLevel level) → AnsiColor
Returns the color for the given log level.
inherited
log(LogRecord record) → List<String>
Formats the given LogRecord into a list of strings.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
stringify(dynamic message) → String
Converts a message to its string representation.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited