♻️ 重构部分代码,打印调试信息

This commit is contained in:
naiba
2021-04-20 19:30:34 +08:00
parent d3c3e55c88
commit 6286e34af0
7 changed files with 70 additions and 38 deletions

View File

@@ -43,7 +43,9 @@ func AlertSentinelStart() {
checkStatus()
checkCount++
if lastPrint.Before(startedAt.Add(-1 * time.Hour)) {
log.Println("报警规则检测每小时", checkCount, "次", startedAt, time.Now())
if Conf.Debug {
log.Println("报警规则检测每小时", checkCount, "次", startedAt, time.Now())
}
checkCount = 0
lastPrint = startedAt
}