调整日志

This commit is contained in:
dongRogen 2022-07-27 14:13:55 +08:00
parent 5792aa75c7
commit d79a7dc3b6
2 changed files with 8 additions and 8 deletions

View File

@ -188,7 +188,7 @@ class ScheduleHandler(
fun rerun(): Boolean {
pause = false
logger?.apply {
if (loopThread.isAlive) info("调度器[$name]继续运转...")
if (loopThread.isAlive) info("调度器[$name]正常运行...")
else warning("调度器[$name]已关闭,无法继续")
}
return loopThread.isAlive
@ -229,7 +229,7 @@ class ScheduleHandler(
false
else {
put(id, action)
logger?.info("调度器[$name]新增任务[$id],总任务量:$size")
logger?.info("新增任务[$id],总任务量:$size--调度器[$name]")
true
}
}
@ -242,7 +242,7 @@ class ScheduleHandler(
infix fun rmTask(id: String) = taskLock.withLock {
if (id in this) {
this -= id
logger?.info("调度器[$name]移除任务[$id],总任务量:$size")
logger?.info("移除任务[$id],总任务量:$size--调度器[$name]")
}
}
@ -269,7 +269,7 @@ class ScheduleHandler(
logger?.apply {
val m = then.get(Calendar.MINUTE)
val h = then.get(Calendar.HOUR_OF_DAY)
info("调度器[$name]添加时刻[$h:$m],时刻表长度:${periodList.size}")
info("添加时刻[$h:$m],时刻表长度:${periodList.size}--调度器[$name]")
}
}
}
@ -283,7 +283,7 @@ class ScheduleHandler(
logger?.apply {
val m = then.get(Calendar.MINUTE)
val h = then.get(Calendar.HOUR_OF_DAY)
info("调度器[$name]移除时刻[$h:$m],时刻表长度:${periodList.size}")
info("移除时刻[$h:$m],时刻表长度:${periodList.size}--调度器[$name]")
}
}
}

View File

@ -71,7 +71,7 @@ class SubscriptionSet(
set += id
logger?.apply {
val type = if (id < 0) "group" else "qq"
info("订阅集[$name]添加订阅{$mod:${type}_$id}mod总订阅量${set.size}")
info("添加订阅{$mod:${type}_$id}mod总订阅量${set.size}--订阅集[$name]")
}
}
}
@ -110,7 +110,7 @@ class SubscriptionSet(
it -= id
logger?.apply {
val type = if (id < 0) "group" else "qq"
info("订阅集[$name]移除订阅{$mod:${type}_$id}mod总订阅量${it.size}")
info("移除订阅{$mod:${type}_$id}mod总订阅量${it.size}--订阅集[$name]")
}
}
}
@ -139,7 +139,7 @@ class SubscriptionSet(
*/
infix fun rmMod(mod: Int) = receiverLock.withLock {
remove(mod)?.let {
logger?.info("订阅集[$name]清除mod[$mod]总mod量$size")
logger?.info("清除mod[$mod]总mod量$size--订阅集[$name]")
}
Unit// return value
}