ISpectBaseLogger class

Console logger: formats messages via ILoggerFormatter and writes them through a LoggerOutput function.

Supports log-level filtering via ConsoleSettings and ILoggerFilter, plus ANSI colorization.

Constructors

ISpectBaseLogger({ConsoleSettings? settings, ILoggerFormatter formatter = const ExtendedLoggerFormatter(), ILoggerFilter? filter, LoggerOutput? output})

Properties

formatter ILoggerFormatter
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
settings ConsoleSettings
final

Methods

copyWith({ConsoleSettings? settings, ILoggerFormatter? formatter, ILoggerFilter? filter, LoggerOutput? output}) ISpectBaseLogger
Returns a new logger with selected fields replaced.
critical(Object? msg) → void
Shorthand for log(msg, level: LogLevel.critical).
debug(Object? msg) → void
Shorthand for log(msg, level: LogLevel.debug).
error(Object? msg) → void
Shorthand for log(msg, level: LogLevel.error).
info(Object? msg) → void
Shorthand for log(msg, level: LogLevel.info).
log(Object? msg, {LogLevel? level, AnsiPen? pen, Object? error, StackTrace? stackTrace, DateTime? time}) → void
Formats msg and writes it through the configured output.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override
verbose(Object? msg) → void
Shorthand for log(msg, level: LogLevel.verbose).
warning(Object? msg) → void
Shorthand for log(msg, level: LogLevel.warning).

Operators

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