LogFileManager class

日志文件管理器

Constructors

LogFileManager({required String storagePath, required LoggerConfig config, required DeviceInfo deviceInfo})

Properties

config LoggerConfig
final
deviceInfo DeviceInfo
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
storagePath String
final

Methods

cleanupOldFiles() Future<void>
清理过期文件
clearAllLogs() Future<void>
清理所有日志
compressOldFiles() Future<void>
压缩旧文件
dispose() Future<void>
销毁资源
exportLogs({DateTime? startDate, DateTime? endDate}) Future<List<File>>
导出日志文件
getTotalFileSize() int
获取总文件大小
initialize() Future<void>
初始化文件管理器
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
writeEvents(List<LogEvent> events) Future<void>
写入事件到文件 (实现同一天合并逻辑)

Operators

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