feat(log): 在控制台输出日志

This commit is contained in:
2025-01-22 14:40:15 +08:00
parent ab65ee1991
commit a57e4cac1c
3 changed files with 7 additions and 3 deletions
+2
View File
@@ -4,6 +4,7 @@ package main
import (
"context"
"os"
"time"
"github.com/cloudwego/hertz/pkg/app"
@@ -59,6 +60,7 @@ func registerMiddleware(h *server.Hertz) {
h.OnShutdown = append(h.OnShutdown, func(ctx context.Context) {
asyncWriter.Sync()
})
hlog.SetOutput(os.Stdout)
// pprof
if conf.GetConf().Hertz.EnablePprof {