1 Star 0 Fork 0

IT牛仔/logger

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
init.go 466 Bytes
Copy Edit Raw Blame History
IT牛仔 authored 2024-07-18 23:52 . config
package logger
import (
"encoding/json"
)
var Log *EsonLogger
func init() {
t := map[string]any{
"filename": "./logs/log.log",
}
Log = InitDefaultNewLogger(t)
}
func InitDefaultNewLogger(config map[string]any) *EsonLogger {
l := NewLogger()
data, _ := json.Marshal(config)
l.SetLogger(AdapterFile, string(data))
l.EnableTrace(true, 2)
l.SetPrefix("eson")
return l
}
func InitNewLogger(config map[string]any) {
Log = InitDefaultNewLogger(config)
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/peitali/logger.git
git@gitee.com:peitali/logger.git
peitali
logger
logger
master

Search