rewrite to using new method
This commit is contained in:
@@ -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))
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user