ConsoleLogPrinter class final
The main console publisher: prints logs using a data-driven row layout.
Pass rows: [LogRow(children: [...], tail: [...])] where each child is
a LogBlock element (LogNum, LogLevelName, LogTime, LogPath,
LogTraceId, LogMessage, LogTags, ...).
Active vs. inactive styling: pass inactiveTheme plus filters
(activeLevels/activeMinLevel, activeNamespaces — prefix matching
by pathSeparator, activeTraceGroups, activeTags or isLogActive,
combined with OR) to dim background logs while emphasizing matching
ones. output defaults to print and is injectable.
Note: a \n inside a message is escaped by the theme's value
formatter; multi-line output comes from data, wrapping and stack
traces, not from raw newlines.
- Implemented types
Constructors
-
ConsoleLogPrinter({LogMainTheme? theme, LogMainTheme? inactiveTheme, int? activeMinLevel, Set<
int> ? activeLevels, Set<String> ? activeNamespaces, Set<String> ? activeTraceGroups, Set<String> ? activeTags, bool isLogActive(Log log)?, String pathSeparator = '/', required List<LogRow> rows, void output(String) = print})
Properties
-
activeLevels
→ Set<
int> -
final
-
activeNamespaces
→ Set<
String> -
final
-
activeTags
→ Set<
String> -
final
-
activeTraceGroups
→ Set<
String> -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- inactiveTheme → LogMainTheme?
-
final
- isLogActive → bool Function(Log log)?
-
final
- output ↔ void Function(String)
-
getter/setter pair
- pathSeparator → String
-
Разделитель пути неймспейсов для префикс-матчинга activeNamespaces
(см.
Logger.pathSeparator).final -
rows
→ List<
LogRow> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- theme → LogMainTheme
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
printRow(
Log log, LogRow row, bool isActive, LogMainTheme main) → void -
publish(
Log log) → void -
Publishes the given
logevent.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited