rewrite to using new method

This commit is contained in:
2024-06-16 18:21:06 -05:00
parent f07bd666fb
commit 790c8c969a
19 changed files with 388 additions and 395 deletions

View File

@@ -1,7 +1,7 @@
package middleware
import (
"log/slog"
"log"
"net/http"
"time"
)
@@ -27,13 +27,13 @@ func Logging(next http.Handler) http.Handler {
next.ServeHTTP(wrapped, r)
slog.Info(
"Health Check",
slog.Int("Method", wrapped.statusCode),
r.Method,
r.URL.Path,
slog.String("time", time.Since(start).String()),
)
// log.Println("INFO", wrapped.statusCode, r.Method, r.URL.Path, time.Since(start))
//slog.Info(
// "Health Check",
// slog.Int("Method", wrapped.statusCode),
// r.Method,
// r.URL.Path,
// slog.String("time", time.Since(start).String()),
//)
log.Println("INFO", wrapped.statusCode, r.Method, r.URL.Path, time.Since(start))
})
}