gin
gin copied to clipboard
Logger skip paths allow params
This change adds support for skip paths with params, e.g.,
"/user/:id". This is more flexible and the implementation is simply
comparing Context.FullPath()
rather than Context.Request.URL.Path
against skip paths.
The only case where it would lead to regression is where legacy code uses hardcoded paths for parameterized paths. E.g., when hardcoded paths like "/user/1" and "/user/2" are added to skipped paths for "/user/:id". Although legal, I cannot imagine when such a case would be useful. Hence I think regression would be extremely rare in practice.
This change also updates relevant tests.
@appleboy @thinkerou Please take a look. Thanks in advance!
@appleboy @thinkerou Please take a look. Thanks in advance!
Change milestone to v1.10