Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes stacktrace logging #34

Merged
merged 1 commit into from
Apr 22, 2024
Merged

Conversation

peter-teslenko
Copy link
Contributor

It seems to me that in structures a pointer to a slog.Logger will look more clear.
Fixed missing field initialization.

@pkieltyka
Copy link
Member

thanks for the PR -- what is the benefit?

@peter-teslenko
Copy link
Contributor Author

Fixed stacktrace creation.

@AnomalRoil
Copy link

This would also fix the problem that prevents Options from being passed currently to the RequestLoggerEntry, meaning the ResponseHeaders option for example is never honored currently by functions relying on NewLogEntry as also mentioned in #39

Options Options
}

func (l *requestLogger) NewLogEntry(r *http.Request) middleware.LogEntry {
entry := &RequestLoggerEntry{}
entry := &RequestLoggerEntry{l.Logger, l.Options, ""}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the most important fix, passing the l.Options here is important to honor options in all RequestLoggerEntry functions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants