Ai
1 Star 0 Fork 0

magicianlyx/GoLog

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
init.go 473 Bytes
一键复制 编辑 原始数据 按行查看 历史
magicianlyx 提交于 2021-11-20 20:59 +08:00 . -
package GoLog
var (
serviceName string
log *Logger
)
func InitDefault() {
Init("local", "debug")
}
func Init(environment string, service string) {
serviceName = service
writers := make([]ILog, 0)
console := NewConsoleLog()
writers = append(writers, console)
attach := make(map[string]interface{})
attach["environment"] = environment
attach["service_name"] = service
log = NewLogger(writers, nil, nil, service, attach)
}
func Stop() {
log.Stop()
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/magicianlyx/GoLog.git
git@gitee.com:magicianlyx/GoLog.git
magicianlyx
GoLog
GoLog
20c45f9b998d

搜索帮助