SingleFileLogger

actual class SingleFileLogger : MiraiLogger

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

expect class SingleFileLogger : MiraiLogger

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

actual class SingleFileLogger : PlatformLogger, MiraiLogger

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

See also

Constructors

SingleFileLogger
Link copied to clipboard
actual fun SingleFileLogger(identity: String)
expect fun SingleFileLogger(identity: String)
actual fun SingleFileLogger(identity: String)
SingleFileLogger
Link copied to clipboard
expect fun SingleFileLogger(identity: String, file: <ERROR CLASS> = File("$identity-${getCurrentDate()}.log"))

Functions

call
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)

根据优先级调用对应函数

debug
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?)
debug0
Link copied to clipboard
open override fun debug0(message: String?)
open override fun debug0(message: String?, e: Throwable?)
error
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?)
error0
Link copied to clipboard
open override fun error0(message: String?)
open override fun error0(message: String?, e: Throwable?)
info
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?)
info0
Link copied to clipboard
open override fun info0(message: String?)
open override fun info0(message: String?, e: Throwable?)
plus
Link copied to clipboard
open operator override fun <T : MiraiLogger> plus(follower: T): T

添加一个 follower, 返回 follower 它只会把 this 的属性 MiraiLogger.follower 修改为这个函数的参数 follower, 然后返回这个参数. 若 MiraiLogger.follower 已经有值, 则会替换掉这个值.

open operator fun <T : MiraiLogger> plus(follower: T): T

添加一个 follower, 返回 follower 它只会把 this 的属性 MiraiLogger.follower 修改为这个函数的参数 follower, 然后返回这个参数. 若 MiraiLogger.follower 已经有值, 则会替换掉这个值.

open operator fun <T : MiraiLogger> plus(follower: T): T

添加一个 follower, 返回 follower 它只会把 this 的属性 MiraiLogger.follower 修改为这个函数的参数 follower, 然后返回这个参数. 若 MiraiLogger.follower 已经有值, 则会替换掉这个值.

verbose
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?)
verbose0
Link copied to clipboard
open override fun verbose0(message: String?)
open override fun verbose0(message: String?, e: Throwable?)
warning
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?)
warning0
Link copied to clipboard
open override fun warning0(message: String?)
open override fun warning0(message: String?, e: Throwable?)

Properties

follower
Link copied to clipboard
open var follower: MiraiLogger?

随从. 在 this 中调用所有方法后都应继续往 follower 传递调用. follower 的存在可以让一次日志被多个日志记录器记录.

follower
Link copied to clipboard
open override var follower: MiraiLogger?

随从. 在 this 中调用所有方法后都应继续往 follower 传递调用. follower 的存在可以让一次日志被多个日志记录器记录.

follower
Link copied to clipboard
open var follower: MiraiLogger?

随从. 在 this 中调用所有方法后都应继续往 follower 传递调用. follower 的存在可以让一次日志被多个日志记录器记录.

identity
Link copied to clipboard
abstract val identity: String?

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

identity
Link copied to clipboard
open override val identity: String?

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

identity
Link copied to clipboard
abstract val identity: String?

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

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

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

isDebugEnabled
Link copied to clipboard
open override val isDebugEnabled: Boolean

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

isDebugEnabled
Link copied to clipboard
open val isDebugEnabled: Boolean

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

isEnabled
Link copied to clipboard
abstract val isEnabled: Boolean

获取 MiraiLogger 是否已开启

isEnabled
Link copied to clipboard
open override val isEnabled: Boolean

获取 MiraiLogger 是否已开启

isEnabled
Link copied to clipboard
abstract val isEnabled: Boolean

获取 MiraiLogger 是否已开启

isErrorEnabled
Link copied to clipboard
open val isErrorEnabled: Boolean

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

isErrorEnabled
Link copied to clipboard
open override val isErrorEnabled: Boolean

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

isErrorEnabled
Link copied to clipboard
open val isErrorEnabled: Boolean

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

isInfoEnabled
Link copied to clipboard
open val isInfoEnabled: Boolean

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

isInfoEnabled
Link copied to clipboard
open override val isInfoEnabled: Boolean

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

isInfoEnabled
Link copied to clipboard
open val isInfoEnabled: Boolean

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

isVerboseEnabled
Link copied to clipboard
open val isVerboseEnabled: Boolean

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

isVerboseEnabled
Link copied to clipboard
open override val isVerboseEnabled: Boolean

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

isVerboseEnabled
Link copied to clipboard
open val isVerboseEnabled: Boolean

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

isWarningEnabled
Link copied to clipboard
open val isWarningEnabled: Boolean

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

isWarningEnabled
Link copied to clipboard
open override val isWarningEnabled: Boolean

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

isWarningEnabled
Link copied to clipboard
open val isWarningEnabled: Boolean

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

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

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