Loggable

interface Loggable(source)

允许对象通过 log 获取 Logger,AutoTweaker 使用 logback 作为实现,插件仅需依赖 slf4j。

实现此接口即可直接 log.info("Hello World") 而无需 LoggerFactory.getLogger

Inheritors

Properties

Link copied to clipboard
val Loggable.log: Logger

获取 Logger,请遵循日志规范,不要污染程序日志。

Functions

Link copied to clipboard

打印一条用于临时调试的 error 级别日志,特殊的命名便于通过自动化脚本扫描。

Link copied to clipboard
fun Loggable.scope(io: IO? = null): CoroutineScope

快速创建一个协程作用域,并在崩溃时记录日志。