LogUtil class

日志工具类

A utility class for logging.

Properties

hashCode int
The hash code for this object.
no setterinherited
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

Operators

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

Static Methods

d(Object object, {String tag = _defaultTag}) → void
打印 Debug 级别日志
e(Object object, {String tag = _defaultTag}) → void
打印 Error 级别日志
getCachedTimestamp() String
获取格式化后的时间戳(带缓存)
getFormattedTimestamp() String
获取格式化后的时间戳
i(Object object, {String tag = _defaultTag}) → void
打印 Info 级别日志
init({bool isDebug = false, String tag = _defaultTag, LogLevel level = LogLevel.verbose}) → void
初始化日志工具类
log(LogLevel level, Object object, {String tag = _defaultTag}) → void
打印日志
registerCallback(LogCallback callback) → void
注册日志回调函数
unregisterAllCallbacks() → void
移除所有日志回调函数
unregisterCallback(LogCallback callback) → void
移除日志回调函数
v(Object object, {String tag = _defaultTag}) → void
打印 Verbose 级别日志
w(Object object, {String tag = _defaultTag}) → void
打印 Warn 级别日志