LogConfig class

日志配置类

Constructors

LogConfig({int retentionDays = 7, bool enableFileLog = true, LogLevel logLevel = LogLevel.all, LogLevel recordLevel = LogLevel.info, Directory? logDirectory, List<LogOutput>? output, LogPrinter? printer, LogFilter? filter, List<LogOutput> composeOutputs(List<LogOutput>)?, int rotateSizeBytes = 5 * 1024 * 1024, int bufferMaxEvents = 256, Duration bufferFlushDelay = const Duration(milliseconds: 300), Duration periodicFlushInterval = const Duration(seconds: 2), String latestFileName = 'latest.log', String? id})
const

Properties

bufferFlushDelay → Duration
final
bufferMaxEvents → int
final
canWriteToFile → bool
检查是否支持文件日志
no setter
composeOutputs → List<LogOutput> Function(List<LogOutput>)?
final
enableFileLog → bool
final
filter → LogFilter?
final
hashCode → int
The hash code for this object.
no setterinherited
id → String?
final
latestFileName → String
final
logDirectory → Directory?
final
logLevel → LogLevel
final
output → List<LogOutput>?
final
periodicFlushInterval → Duration
final
printer → LogPrinter?
final
recordLevel → LogLevel
final
retentionDays → int
final
rotateSizeBytes → int
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
validate() → void

Operators

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