添加example&优化参数截取

This commit is contained in:
Yun
2024-07-09 16:35:14 +08:00
parent 70699e9701
commit 1abd260929
3 changed files with 64 additions and 20 deletions
+3
View File
@@ -2,6 +2,7 @@ package main
import (
"context"
"time"
"github.com/yuninks/loggerx"
)
@@ -11,6 +12,8 @@ func main() {
log := loggerx.NewLogger(ctx,
// loggerx.SetPrintFile(false),
loggerx.SetToConsole(),
// loggerx.SetTimeZone(time.UTC),
loggerx.SetTimeZone(time.FixedZone("CST", 8*3600)),
)
log.Info(ctx, "哈哈哈2")
log.Info(ctx, "哈哈哈2")