2
0
mirror of https://gitee.ltd/lxh/logger.git synced 2026-04-14 11:45:50 +08:00

支持初始化的时候从环境变量读取配置信息

This commit is contained in:
李寻欢
2021-12-29 14:33:48 +08:00
parent 3f6003edd7
commit 6253de5599
6 changed files with 31 additions and 12 deletions

View File

@@ -1,8 +1,16 @@
package logger
import "testing"
import (
"testing"
"time"
)
func TestLogger(t *testing.T) {
InitLogger(LogConfig{Mode: Dev, LokiEnable: false, FileEnable: true})
Say.Debug("芜湖")
}
func TestLogger1(t *testing.T) {
Say.Info("我是测试消息")
time.Sleep(5 * time.Second)
}