Files
v2ray_simple/utils/log_test.go
e1732a364fed 2e7dda7c18 修订代码,文档;logfile标准配置以及-sp行为改变,见下:
在标准 toml 配置中 配置 logfile 配置文件路径。 如 `logfile = "/var/log/verysimple/vs_log"`

将 -sp 的行为 改为 打印完毕后立即退出。
2022-04-29 21:40:01 +08:00

29 lines
390 B
Go

package utils
import (
"errors"
"testing"
"go.uber.org/zap"
)
func TestZaplog(t *testing.T) {
LogLevel = Log_info
InitLog("")
if ce := CanLogDebug("test1"); ce != nil {
ce.Write(
zap.Uint32("uid", 32),
zap.Error(errors.New("asdfdsf")),
)
}
if ce := CanLogInfo("test2"); ce != nil {
ce.Write(
zap.Uint32("uid", 32),
zap.Error(errors.New("asdfdsf")),
)
}
}