lower log level for frequent messages

This commit is contained in:
Pay Giesselmann
2023-06-20 15:47:38 +02:00
parent d0516f12b0
commit a9544f5609
8 changed files with 29 additions and 29 deletions

View File

@@ -338,7 +338,7 @@ func main() {
handlers.AllowedOrigins([]string{"*"})))
handler := handlers.CustomLoggingHandler(io.Discard, r, func(_ io.Writer, params handlers.LogFormatterParams) {
if strings.HasPrefix(params.Request.RequestURI, "/api/") {
log.Infof("%s %s (%d, %.02fkb, %dms)",
log.Debugf("%s %s (%d, %.02fkb, %dms)",
params.Request.Method, params.URL.RequestURI(),
params.StatusCode, float32(params.Size)/1024,
time.Since(params.TimeStamp).Milliseconds())