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

fix: only add log middleware to not found handler when enabled #3969

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

AlexLast
Copy link
Contributor

@AlexLast AlexLast commented Mar 4, 2024

The notFoundHandler() function builds its own chain, that will always contain the log middleware, even when Middlewares.Log = false.

This change ensures the log handler is only added to this chain conditionally.

Copy link

codecov bot commented Mar 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.21%. Comparing base (2629636) to head (0b363f5).
Report is 8 commits behind head on master.

Additional details and impacted files
Files Coverage Δ
rest/engine.go 100.00% <100.00%> (ø)

... and 252 files with indirect coverage changes

@kevwan kevwan added this pull request to the merge queue Mar 5, 2024
Merged via the queue into zeromicro:master with commit ba1d6e3 Mar 5, 2024
6 checks passed
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

2 participants