LogManager class

Available extensions

Constructors

LogManager.new()
factory

Properties

documentName String
日志文件的文件夹
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

checkDirectory(String root, String name) Future<void>

Available on LogManager, provided by the LogFilePath extension

检查日志文件夹是否存在,如果不存在,则创建文件夹
clearLogs() Future<bool>
清理日志文件夹
deleteDirectory(String path, {bool recursive = false}) Future<bool>

Available on LogManager, provided by the LogFilePath extension

删除绝对路径地址为path的文件夹, recursive: 是否递归删除,默认为false,如果未false,则删除的文件夹下如果存在文件, 则会删除失败
deleteLog(String filePath) Future<bool>
删除指定filePath的日志文件 返回删除结果
directoryPath() Future<String>

Available on LogManager, provided by the LogFilePath extension

找到正确的本地路径
documentPath() Future<String>

Available on LogManager, provided by the LogFilePath extension

日志文件的文件夹绝对地址
filename() String

Available on LogManager, provided by the LogFilePath extension

生成文件名称,目前的文件名称是以日期的天命名的
filepath(String filename) Future<String>

Available on LogManager, provided by the LogFilePath extension

日志文件的绝对地址
getLogs() Future<List<FileSystemEntity>>

Available on LogManager, provided by the LogFile extension

获取logs文件列表
localFile(String logFilePath) Future<File>

Available on LogManager, provided by the LogFile extension

创建一个指向logFilePath的引用
localLog(String message, String logFilePath) Future<File>

Available on LogManager, provided by the LogFile extension

logFilePath日志文件中,本地化存储message
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readLogAsync(String filePath) Future<String>
获取filePath路径下的日志文件内容
sdkInit() Future<void>
temporaryPath() Future<String>

Available on LogManager, provided by the LogFilePath extension

临时文件夹的路径
toString() String
A string representation of this object.
inherited
writeLog(String message) Future<LogManager>
message写入当天创建的日志文件中
writeLogSync(String message) → dynamic
zipLogs() Future<String>
压缩日志文件夹

Operators

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

Static Properties

instance LogManager
no setter