EzLogger

interface EzLogger

日志接口。

core 模块默认使用 DefaultLogger(输出到 System.err)。 Android 环境可替换为 android.util.Log 实现。

EzReflect.logger = object : EzLogger {
override fun debug(tag: String, msg: String) { Log.d(tag, msg) }
override fun warn(tag: String, msg: String) { Log.w(tag, msg) }
override fun error(tag: String, msg: String, t: Throwable?) { Log.e(tag, msg, t) }
}

Functions

Link copied to clipboard
abstract fun debug(tag: String, msg: String)

输出调试日志。

Link copied to clipboard
abstract fun error(tag: String, msg: String, t: Throwable? = null)

输出错误日志,并可附带异常。

Link copied to clipboard
abstract fun warn(tag: String, msg: String)

输出警告日志。