2 Star 0 Fork 0

no-src/log

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
empty_logger_test.go 496 Bytes
一键复制 编辑 原始数据 按行查看 历史
package log
import (
"testing"
"github.com/no-src/log/formatter"
)
func TestEmptyLogger(t *testing.T) {
testCases := []struct {
name string
formatter string
}{
{"TextFormatter", formatter.TextFormatter},
{"JsonFormatter", formatter.JsonFormatter},
}
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
InitDefaultLogger(NewEmptyLogger().WithFormatter(formatter.New(tc.formatter)).WithTimeFormat(testTimeFormat))
defer Close()
testLogs(t)
})
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/no-src/log.git
git@gitee.com:no-src/log.git
no-src
log
log
main

搜索帮助