Closed xu756 closed 5 months ago
Describe the Question
我配置hlog.SetLogger。日志全部输出到了文件,控制台没有了,我想文件 控制台都有 在官网没有找到相关设置 Reproducible Code
Screenshots
If applicable, add screenshots to help explain your question.
Hertz version:
0.7.3
Environment:
GO111MODULE='on' GOARCH='arm64' GOBIN='' GOCACHE='/Users/xu756/Library/Caches/go-build' GOENV='/Users/xu756/Library/Application Support/go/env' GOEXE='' GOEXPERIMENT='' GOFLAGS='' GOHOSTARCH='arm64' GOHOSTOS='darwin' GOINSECURE='' GOMODCACHE='/Users/xu756/开发/go/pkg/mod' GONOPROXY='' GONOSUMDB='' GOOS='darwin' GOPATH='/Users/xu756/开发/go' GOPRIVATE='' GOPROXY='https://goproxy.cn,direct' GOROOT='/Users/xu756/devenv/go' GOSUMDB='sum.golang.org'
Additional context 启动函数如下
var file = flag.String("f", "configs/dev.yaml", "config file path") func main() { flag.Parse() config.Init(*file) log.Printf("【 WxappApi 】addr on %s", config.RunData.Addr.WxappApiAddr) hlog.SetLogger(xlog.InitHertzLog("wxapp")) hander.Init() router.InitRouter() err := router.HttpServer.Run() if err != nil { log.Fatalf("【 WxappApi 】run error: %v", err) } }
This issue has been marked as invalid question, please give more information by following the issue template. The issue will be closed in 1 days if no further activity occurs.
issue
I found a solution to this issue 769
Print to console performance is poor
Describe the Question
我配置hlog.SetLogger。日志全部输出到了文件,控制台没有了,我想文件 控制台都有 在官网没有找到相关设置 Reproducible Code
Screenshots
If applicable, add screenshots to help explain your question.
Hertz version:
0.7.3
Environment:
Additional context 启动函数如下