ConsoleLogStrategy constructor

ConsoleLogStrategy({
  1. LogLevel logLevel = LogLevel.none,
  2. List<LogEvent>? supportedEvents,
  3. bool useModernFormatting = true,
  4. bool useColors = true,
  5. bool useEmojis = true,
  6. bool showTimestamp = true,
  7. bool showContext = true,
})

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;