Apply .gitignore rules
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
package esLogUtil
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// 日志对象
|
||||
type EsLog struct {
|
||||
// 日志类型
|
||||
LogType string
|
||||
|
||||
// 日志消息
|
||||
Message string
|
||||
|
||||
// 程序标识
|
||||
InnerId string
|
||||
|
||||
// 日志时间
|
||||
CrTime time.Time
|
||||
}
|
||||
|
||||
func new(logType string, msg string, innerId string) *EsLog {
|
||||
logObj := logPool.Get().(*EsLog)
|
||||
|
||||
logObj.CrTime = time.Now()
|
||||
logObj.LogType = logType
|
||||
logObj.Message = msg
|
||||
logObj.InnerId = innerId
|
||||
|
||||
return logObj
|
||||
|
||||
//
|
||||
//return EsLog{
|
||||
// LogType: logType,
|
||||
// Message: msg,
|
||||
// InnerId: innerId,
|
||||
// CrTime: time.Now(),
|
||||
//}
|
||||
}
|
||||
Reference in New Issue
Block a user