1 Star 0 Fork 0

zjh-tech / go-elog

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
def.go 821 Bytes
Copy Edit Raw Blame History
zjh-tech authored 2024-02-22 16:22 . modify
package elog
import (
"fmt"
"sync"
)
const (
LogDebug = iota
LogInfo
LogWarn
LogError
)
var loglevels = []string{
"[DEBUG]",
"[INFO]",
"[WARN]",
"[ERROR]",
}
type LogEvent struct {
level int
content string
file string
line int
}
var GLogEventPool = sync.Pool{
New: func() interface{} {
return &LogEvent{}
},
}
const LogBuffEventSize = 100000
const CommonLogCallDepth = 3
const GlobalLogCallDepth = 4
type FuncType func(...interface{})
type ArgType []interface{}
const LogMajorVersion = 1
const LogSubVersion = 0
const LogRevisionVersion = 0
type LogVersion struct {
}
func (l *LogVersion) GetVersion() string {
return fmt.Sprintf("Log Version: %v.%v.%v", LogMajorVersion, LogSubVersion, LogRevisionVersion)
}
var GLogVersion *LogVersion
func init() {
GLogVersion = &LogVersion{}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/zjh-tech/go-elog.git
git@gitee.com:zjh-tech/go-elog.git
zjh-tech
go-elog
go-elog
master

Search

344bd9b3 5694891 D2dac590 5694891