haozhifeng
2021-06-30 6c71ed49668ae5e7711b337d57051f82a3dd65cc
logc.go
@@ -1,8 +1,7 @@
package logc
import (
   "basic.com/valib/bhomebus.git"
   "encoding/json"
   "basic.com/valib/bhshmq.git/proto/source/bhome_msg"
   "fmt"
   "sync"
   "time"
@@ -45,7 +44,7 @@
}
type LogRegister struct {
   Nodes      []bhomebus.NetNode
   Nodes      []bhome_msg.BHAddress
   Topic      string
   Payload     []byte
}
@@ -94,7 +93,7 @@
   }
   if msg == "" {
      retrun
      return
   }
   log := &ScheduleLog{
@@ -109,7 +108,7 @@
   deliverLog(log, timeout)
}
func deliverLog(l LogPrinter, timeout time.Duration)  {
func deliverLog(l LogPrinter, timeout time.Duration) {
   select {
   case logCh <- l:
      return
@@ -181,8 +180,8 @@
         if err != nil {
            logger.Error("failed to Marshal", log)
         } else {
               var nodes []bhomebus.NetNode
               nodes = append(nodes, bhomebus.NetNode{})
               var nodes []bhome_msg.BHAddress
               nodes = append(nodes, bhome_msg.BHAddress{})
               reg := &LogRegister {
                  nodes,