🐛 fix a bug.
This commit is contained in:
parent
44f3ff15a1
commit
8e6ff1a7e7
@ -8,6 +8,11 @@ import (
|
|||||||
var config LogConfig
|
var config LogConfig
|
||||||
var Say *zap.SugaredLogger
|
var Say *zap.SugaredLogger
|
||||||
|
|
||||||
|
// 避免异常,在第一次调用时初始化一个只打印到控制台的logger
|
||||||
|
func init() {
|
||||||
|
InitLogger(LogConfig{Mode: Dev, LokiEnable: false, FileEnable: false})
|
||||||
|
}
|
||||||
|
|
||||||
// InitLogger 初始化日志工具
|
// InitLogger 初始化日志工具
|
||||||
func InitLogger(c LogConfig) {
|
func InitLogger(c LogConfig) {
|
||||||
config = c
|
config = c
|
||||||
|
Loading…
Reference in New Issue
Block a user