mirror of
https://github.com/TecharoHQ/anubis.git
synced 2025-08-03 17:59:24 -04:00
fix(internal): add host, method, and path to request logs
Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
parent
e014be9575
commit
6e75b8d363
@ -28,6 +28,9 @@ func InitSlog(level string) {
|
||||
|
||||
func GetRequestLogger(r *http.Request) *slog.Logger {
|
||||
return slog.With(
|
||||
"host", r.Host,
|
||||
"method", r.Method,
|
||||
"path", r.URL.Path,
|
||||
"user_agent", r.UserAgent(),
|
||||
"accept_language", r.Header.Get("Accept-Language"),
|
||||
"priority", r.Header.Get("Priority"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user