ConsoleLogStrategy constructor
ConsoleLogStrategy({})
Constructs a ConsoleLogStrategy.
logLevel
sets the log level at which this strategy becomes active.
supportedEvents
optionally specifies which types of LogEvent this strategy should handle.
useModernFormatting
enables modern console formatting with colors and emojis.
useColors
enables colored output.
useEmojis
enables emoji indicators for log levels.
showTimestamp
shows timestamp in logs.
showContext
shows context information in logs.
Implementation
ConsoleLogStrategy({
super.logLevel = LogLevel.none,
super.supportedEvents,
bool useModernFormatting = true,
bool useColors = true,
bool useEmojis = true,
bool showTimestamp = true,
bool showContext = true,
}) : _useModernFormatting = useModernFormatting,
_useColors = useColors,
_useEmojis = useEmojis,
_showTimestamp = showTimestamp,
_showContext = showContext;