LoggingConfig class

Annotations

Constructors

LoggingConfig({bool enablePrettyLogs = true, bool showEmojis = true, bool showTimestamp = true, bool showColors = true, bool showBorders = true, bool showMetadata = true, int lineLength = 120, LogLevel minimumLevel = LogLevel.verbose, bool enabled = true, bool enableDevToolsJson = false, Map<LogType, LogTypeConfig> logTypeConfigs = const {}, int? maxLogs, int? retentionDays, bool autoCleanup = true})
const
LoggingConfig.development()
factory
LoggingConfig.minimal()
Zero-config preset that works out of the box. Automatically detects debug/release mode and configures accordingly.
factory
LoggingConfig.production()
factory

Properties

autoCleanup bool
Whether to automatically clean up old logs on initialization.
final
enabled bool
final
enableDevToolsJson bool
final
enablePrettyLogs bool
final
formatter PrettyLogFormatter
no setter
hashCode int
The hash code for this object.
no setteroverride
lineLength int
final
logTypeConfigs Map<LogType, LogTypeConfig>
final
maxLogs int?
Maximum number of logs to retain. Set to null for unlimited.
final
minimumLevel LogLevel
final
retentionDays int?
Maximum age of logs in days. Logs older than this will be cleaned up. Set to null to keep logs forever.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showBorders bool
final
showColors bool
final
showEmojis bool
final
showMetadata bool
final
showTimestamp bool
final

Methods

copyWith({bool? enablePrettyLogs, bool? showEmojis, bool? showTimestamp, bool? showColors, bool? showBorders, bool? showMetadata, int? lineLength, LogLevel? minimumLevel, bool? enabled, bool? enableDevToolsJson, Map<LogType, LogTypeConfig>? logTypeConfigs, int? maxLogs, int? retentionDays, bool? autoCleanup}) LoggingConfig
getConfigForCategory(String? category) LogTypeConfig
getConfigForType(LogType type) LogTypeConfig
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
withLogTypeConfig(LogType type, LogTypeConfig config) LoggingConfig

Operators

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

Static Methods

mapCategoryToLogType(String? category) LogType