SingleFileLogger

将日志写入('append')到特定文件.

See also

查看格式信息

将日志写入('append')到特定文件.

See also

查看格式信息

将日志写入('append')到特定文件.

See also

查看格式信息

Constructors

Link copied to clipboard
actual constructor(identity: String)
expect constructor(identity: String)
expect constructor(identity: String, file: <Error class: unknown class> = File("$identity-${getCurrentDate()}.log"))
actual constructor(identity: String)

Functions

Link copied to clipboard
open override fun call(priority: SimpleLogger.LogPriority, message: String?, e: Throwable?)

根据优先级调用对应函数

open fun call(priority: SimpleLogger.LogPriority, message: String? = null, e: Throwable? = null)

根据优先级调用对应函数

open fun call(priority: SimpleLogger.LogPriority, message: String? = null, e: Throwable? = null)

根据优先级调用对应函数

Link copied to clipboard
open override fun debug(message: String?)

记录一个 调试 级别的日志.

open override fun debug(e: Throwable?)
open override fun debug(message: String?, e: Throwable?)
abstract fun debug(message: String?)

记录一个 调试 级别的日志.

open fun debug(e: Throwable?)
abstract fun debug(message: String?, e: Throwable?)
abstract fun debug(message: String?)

记录一个 调试 级别的日志.

open fun debug(e: Throwable?)
abstract fun debug(message: String?, e: Throwable?)
Link copied to clipboard
inline fun MiraiLogger.debug(message: () -> String?)
inline fun MiraiLogger.debug(message: () -> String?, e: Throwable?)
Link copied to clipboard
open override fun debug0(message: String?)
open override fun debug0(message: String?, e: Throwable?)
Link copied to clipboard
open override fun error(message: String?)

记录一个 错误 级别的日志.

open override fun error(e: Throwable?)
open override fun error(message: String?, e: Throwable?)
abstract fun error(message: String?)

记录一个 错误 级别的日志.

open fun error(e: Throwable?)
abstract fun error(message: String?, e: Throwable?)
abstract fun error(message: String?)

记录一个 错误 级别的日志.

open fun error(e: Throwable?)
abstract fun error(message: String?, e: Throwable?)
Link copied to clipboard
inline fun MiraiLogger.error(message: () -> String?)
inline fun MiraiLogger.error(message: () -> String?, e: Throwable?)
Link copied to clipboard
open override fun error0(message: String?)
open override fun error0(message: String?, e: Throwable?)
Link copied to clipboard
open override fun info(message: String?)

记录一个 信息 级别的日志.

open override fun info(e: Throwable?)
open override fun info(message: String?, e: Throwable?)
abstract fun info(message: String?)

记录一个 信息 级别的日志.

open fun info(e: Throwable?)
abstract fun info(message: String?, e: Throwable?)
abstract fun info(message: String?)

记录一个 信息 级别的日志.

open fun info(e: Throwable?)
abstract fun info(message: String?, e: Throwable?)
Link copied to clipboard
inline fun MiraiLogger.info(message: () -> String?)
inline fun MiraiLogger.info(message: () -> String?, e: Throwable?)
Link copied to clipboard
open override fun info0(message: String?)
open override fun info0(message: String?, e: Throwable?)
Link copied to clipboard
open override fun verbose(message: String?)

记录一个 verbose 级别的日志. 无关紧要的, 经常大量输出的日志应使用它.

open override fun verbose(e: Throwable?)
open override fun verbose(message: String?, e: Throwable?)
abstract fun verbose(message: String?)

记录一个 verbose 级别的日志. 无关紧要的, 经常大量输出的日志应使用它.

open fun verbose(e: Throwable?)
abstract fun verbose(message: String?, e: Throwable?)
abstract fun verbose(message: String?)

记录一个 verbose 级别的日志. 无关紧要的, 经常大量输出的日志应使用它.

open fun verbose(e: Throwable?)
abstract fun verbose(message: String?, e: Throwable?)
Link copied to clipboard
inline fun MiraiLogger.verbose(message: () -> String)
inline fun MiraiLogger.verbose(message: () -> String, e: Throwable?)
Link copied to clipboard
open override fun verbose0(message: String?)
open override fun verbose0(message: String?, e: Throwable?)
Link copied to clipboard
open override fun warning(message: String?)

记录一个 警告 级别的日志.

open override fun warning(e: Throwable?)
open override fun warning(message: String?, e: Throwable?)
abstract fun warning(message: String?)

记录一个 警告 级别的日志.

open fun warning(e: Throwable?)
abstract fun warning(message: String?, e: Throwable?)
abstract fun warning(message: String?)

记录一个 警告 级别的日志.

open fun warning(e: Throwable?)
abstract fun warning(message: String?, e: Throwable?)
Link copied to clipboard
inline fun MiraiLogger.warning(message: () -> String?)
inline fun MiraiLogger.warning(message: () -> String?, e: Throwable?)
Link copied to clipboard
open override fun warning0(message: String?)
open override fun warning0(message: String?, e: Throwable?)
Link copied to clipboard

给这个 logger 添加一个开关, 用于控制是否记录 log

Properties

Link copied to clipboard
open override val identity: String?

日志的标记. 在 Mirai 中, identity 可为

abstract val identity: String?

日志的标记. 在 Mirai 中, identity 可为

abstract val identity: String?

日志的标记. 在 Mirai 中, identity 可为

Link copied to clipboard
val isColored: Boolean = true
Link copied to clipboard
open override val isDebugEnabled: Boolean

当 DEBUG 级别的日志启用时返回 true

当 DEBUG 级别的日志启用时返回 true

当 DEBUG 级别的日志启用时返回 true

Link copied to clipboard
open override val isEnabled: Boolean

获取 MiraiLogger 是否已开启

abstract val isEnabled: Boolean

获取 MiraiLogger 是否已开启

abstract val isEnabled: Boolean

获取 MiraiLogger 是否已开启

Link copied to clipboard
open override val isErrorEnabled: Boolean

当 ERROR 级别的日志启用时返回 true

当 ERROR 级别的日志启用时返回 true

当 ERROR 级别的日志启用时返回 true

Link copied to clipboard
open override val isInfoEnabled: Boolean

当 INFO 级别的日志启用时返回 true

当 INFO 级别的日志启用时返回 true

当 INFO 级别的日志启用时返回 true

Link copied to clipboard
open override val isVerboseEnabled: Boolean

当 VERBOSE 级别的日志启用时返回 true.

当 VERBOSE 级别的日志启用时返回 true.

当 VERBOSE 级别的日志启用时返回 true.

Link copied to clipboard
open override val isWarningEnabled: Boolean

当 WARNING 级别的日志启用时返回 true

当 WARNING 级别的日志启用时返回 true

当 WARNING 级别的日志启用时返回 true

Link copied to clipboard
open val output: (String) -> Unit

日志输出. 不会自动添加换行