mirror of
https://gitee.ltd/lxh/logger.git
synced 2026-04-14 11:45:50 +08:00
✨ 支持初始化的时候从环境变量读取配置信息
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user