liuxiaolong
2021-08-31 59ac3141ef3e9eb741c2927a7adfd3cb52b21741
logc.go
@@ -1,8 +1,7 @@
package logc
import (
   "basic.com/valib/bhomebus.git"
   "basic.com/valib/bhshmq.git/proto/source/bhome_msg"
   "basic.com/valib/c_bhomebus.git/proto/source/bhome_msg"
   "fmt"
   "sync"
   "time"
@@ -109,6 +108,10 @@
   deliverLog(log, timeout)
}
func SaveRuleServerLog(ruleServerPushLog RuleServerPushLog, timeout time.Duration) {
   deliverLog(&ruleServerPushLog, timeout)
}
func deliverLog(l LogPrinter, timeout time.Duration) {
   select {
   case logCh <- l:
@@ -163,6 +166,7 @@
const (
   OperationLogTopic = "operationLogSaveTopic"
   ScheduleLogTopic = "scheduleLogSaveTopic"
   RuleServerLogTopic = "ruleServerLogSaveTopic"
)
func saveLoop(logCallback LogReportCallback, wg *sync.WaitGroup, done  chan struct{}) {