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

Logging not working when no route matched #127

Closed
System-Glitch opened this issue Jan 11, 2021 · 0 comments
Closed

Logging not working when no route matched #127

System-Glitch opened this issue Jan 11, 2021 · 0 comments

Comments

@System-Glitch
Copy link
Member

Version: v3.6.0
Environment: Ubuntu 20.04, Go 1.15.6
Reproduces: always

This is not really a bug. Requests that don't match any route (404 or 405) are not logged by the logging middleware, because middleware are only executed if a route is matching.

How it occurred

  1. Register the logging middleware
  2. Request a non-existing URL or an existing one with the wrong HTTP method
  3. Notice nothing is logged

Expected result:
Logging should probably log all requests, including 404 and 405.

How to reproduce

router.Middleware(log.CombinedLogMiddleware())
System-Glitch added a commit that referenced this issue Nov 23, 2021
@System-Glitch System-Glitch mentioned this issue Jan 14, 2022
Merged
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

No branches or pull requests

1 participant