优化节点日志

This commit is contained in:
GoEdgeLab
2021-11-30 16:43:16 +08:00
parent f705543145
commit 2ad19634d7
7 changed files with 43 additions and 13 deletions

View File

@@ -8,5 +8,5 @@ import (
)
type DAOInterface interface {
CreateLog(tx *dbs.Tx, nodeRole nodeconfigs.NodeRole, nodeId int64, serverId int64, originId int64, level string, tag string, description string, createdAt int64) error
CreateLog(tx *dbs.Tx, nodeRole nodeconfigs.NodeRole, nodeId int64, serverId int64, originId int64, level string, tag string, description string, createdAt int64, logType string, paramsJSON []byte) error
}

View File

@@ -109,7 +109,7 @@ Loop:
for {
select {
case log := <-logChan:
err := sharedDAO.CreateLog(nil, nodeconfigs.NodeRoleAPI, log.NodeId, log.ServerId, log.OriginId, log.Level, log.Tag, log.Description, log.CreatedAt)
err := sharedDAO.CreateLog(nil, nodeconfigs.NodeRoleAPI, log.NodeId, log.ServerId, log.OriginId, log.Level, log.Tag, log.Description, log.CreatedAt, "", nil)
if err != nil {
return err
}