mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-19 20:32:35 +02:00
moved API request log to debug level
This commit is contained in:
parent
ba26e6a5d6
commit
d936e24692
2 changed files with 2 additions and 1 deletions
|
@ -54,7 +54,7 @@ func checkHost(f http.HandlerFunc) http.HandlerFunc {
|
|||
http.Error(w, "forbidden", http.StatusForbidden)
|
||||
return
|
||||
}
|
||||
LogInfo(r).Interface("headers", r.Header).Msg("API request")
|
||||
LogDebug(r).Interface("headers", r.Header).Msg("API request")
|
||||
f(w, r)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,3 +16,4 @@ func reqLogger(r *http.Request, level zerolog.Level) *zerolog.Event {
|
|||
func LogError(r *http.Request) *zerolog.Event { return reqLogger(r, zerolog.ErrorLevel) }
|
||||
func LogWarn(r *http.Request) *zerolog.Event { return reqLogger(r, zerolog.WarnLevel) }
|
||||
func LogInfo(r *http.Request) *zerolog.Event { return reqLogger(r, zerolog.InfoLevel) }
|
||||
func LogDebug(r *http.Request) *zerolog.Event { return reqLogger(r, zerolog.DebugLevel) }
|
||||
|
|
Loading…
Add table
Reference in a new issue