Merge pull request #156 from giesselmann/log_levels

lower log level for frequent messages
This commit is contained in:
Jan Eitzinger
2023-06-23 10:33:44 +02:00
committed by GitHub
7 changed files with 28 additions and 28 deletions

View File

@@ -341,7 +341,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())