2021-12-14 10:53:50 +08:00
|
|
|
package logger
|
|
|
|
|
2021-12-29 14:33:48 +08:00
|
|
|
import (
|
2022-05-18 17:43:19 +08:00
|
|
|
"gitee.ltd/lxh/logger/log"
|
2021-12-29 14:33:48 +08:00
|
|
|
"testing"
|
|
|
|
"time"
|
|
|
|
)
|
2021-12-14 10:53:50 +08:00
|
|
|
|
|
|
|
func TestLogger(t *testing.T) {
|
|
|
|
InitLogger(LogConfig{Mode: Dev, LokiEnable: false, FileEnable: true})
|
2022-05-18 18:53:17 +08:00
|
|
|
log.Debug("芜湖")
|
2021-12-14 10:53:50 +08:00
|
|
|
}
|
2021-12-29 14:33:48 +08:00
|
|
|
|
|
|
|
func TestLogger1(t *testing.T) {
|
2022-05-18 18:53:17 +08:00
|
|
|
log.Info("我是测试消息")
|
2021-12-29 14:33:48 +08:00
|
|
|
time.Sleep(5 * time.Second)
|
|
|
|
}
|
2022-05-18 10:42:45 +08:00
|
|
|
|
|
|
|
func TestLogger2(t *testing.T) {
|
|
|
|
InitLogger(LogConfig{Mode: Dev, LokiEnable: false, FileEnable: true})
|
2022-05-18 17:43:19 +08:00
|
|
|
log.Info("我是测试消息")
|
|
|
|
//time.Sleep(5 * time.Second)
|
2022-05-18 10:42:45 +08:00
|
|
|
}
|