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 the httplog.Options from httplog.Logger are present in middleware.LogEntry #39

Closed stefansaasen closed 6 months ago

stefansaasen commented 9 months ago

This fixes #35 as the httplog.Options#JSON now causes the log entry to not be pretty printed to stderr if set to true.

stefansaasen commented 9 months ago

This works but the test requires the changes from #38

stefansaasen commented 9 months ago

This is similar to #34 but changing only the cause of the bug and adding a test for it. Credit really goes to @peter-teslenko for fixing #35

stefansaasen commented 6 months ago

With #34 merged the bug has been fixed. This PR has a test for the change but not sure if that is worth adding. The httplog package doesn't have any tests to begin with.