-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
after I wraped gin.Handler(), the program didnot not reponse to CTRL +C/D
func RunWithDebugDashboard(r *gin.Engine, addr string) error {
handler := govisual.Wrap(
r,
govisual.WithRequestBodyLogging(true), // Log request bodies
govisual.WithResponseBodyLogging(true), // Log response bodies
)
fmt.Printf("Listening and serving HTTP on %s\n", addr)
fmt.Printf("debug dashboard on %s/__viz/\n", addr)
return http.ListenAndServe(addr, handler)
}
RunWithDebugDashboard(r, addr)
if err := r.Run(fmt.Sprintf(":%d", config.AppConfig.ApiPort)); err != nil {
logger.Error("run server returns error", zap.Error(err))
}
I'm not sure if gin engine did something for system signal, could you provider a http middleware instead of wraphandle
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working