go-chi / httplog

Go HTTP request logger with structured logging capabilities built on "log/slog" package
MIT License
207 stars 42 forks source link

Ensure LogEntrySetField(s) affect value returned by LogEntry #48

Open nfcampos opened 1 month ago

nfcampos commented 1 month ago

LogEntry returns the logger pointer stored on RequestLoggerEntry, therefore LogEntrySetField needs to update the value that pointer refers to, instead of replacing it with a new pointer. Added a test that failed without this fix.