mirror of
https://gitee.ltd/lxh/logger.git
synced 2025-10-23 14:56:16 +08:00
🎉logger的v2版本,暂未支持环境变量配置
This commit is contained in:
20
logger_test.go
Normal file
20
logger_test.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package zap_logger
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"gitee.ltd/lxh/logger/v2/log"
|
||||
)
|
||||
|
||||
func TestNewZapLogger(t *testing.T) {
|
||||
err := NewZapLogger("", WithEncoder(JsonEncoder))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
return
|
||||
}
|
||||
|
||||
log.Info("hahahahah")
|
||||
log.Error("123321")
|
||||
log.Panic("this is panic")
|
||||
|
||||
}
|
Reference in New Issue
Block a user