优化日志数据生成

This commit is contained in:
2024-07-24 22:43:09 +08:00
parent 76e459ffcc
commit 80b1484ef0
3 changed files with 29 additions and 45 deletions

View File

@ -18,16 +18,8 @@ import (
"go.uber.org/zap/zapcore"
)
// FillLogDataFunc 定义填充数据的方法
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 21:33 2024/7/24
type FillLogDataFunc func(data *LogData)
var (
wsLoggerConnect storage.IConnection // ws 日志连接管理实例
fillLogDataFunc FillLogDataFunc // 填充数据方法
)
// SetWsLoggConnect 设置ws connect
@ -48,29 +40,6 @@ func GetWsLoggConnect(connect storage.IConnection) {
wsLoggerConnect = connect
}
// SetFillLogDataFunc ...
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 21:34 2024/7/24
func SetFillLogDataFunc(fillFunc FillLogDataFunc) {
fillLogDataFunc = fillFunc
}
// GetFillLogDataFunc 获取填充数据的方法
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 21:36 2024/7/24
func GetFillLogDataFunc() FillLogDataFunc {
if nil == fillLogDataFunc {
return func(data *LogData) {
}
}
return fillLogDataFunc
}
// LogData 记录日志数据
//
// Author : go_developer@163.com<白茶清欢>