Skip to content

Conversation

@mohammed90
Copy link
Member

I found that any direct use of Log() function to get the default *zap.Logger results in bypass of any configured include/exclude rules. Using the filteringCore ensures the default loggers respects the user configuration.

Signed-off-by: Mohammed Al Sahaf <msaa1990@gmail.com>
@mohammed90 mohammed90 requested a review from mholt May 1, 2025 23:48
@mohammed90 mohammed90 added the bug 🐞 Something isn't working label May 1, 2025
Signed-off-by: Mohammed Al Sahaf <msaa1990@gmail.com>
@mohammed90 mohammed90 added the under review 🧐 Review is pending before merging label May 2, 2025
Copy link
Member

@mholt mholt left a comment

Choose a reason for hiding this comment

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

Thanks! This is probably good 😊

@mholt mholt enabled auto-merge (squash) May 6, 2025 22:00
@mholt mholt removed the under review 🧐 Review is pending before merging label May 6, 2025
@mholt mholt merged commit 9f71483 into master May 6, 2025
20 checks passed
@mholt mholt deleted the default-logger-filters branch May 6, 2025 22:06
@francislavoie francislavoie added this to the v2.10.1 milestone Aug 22, 2025
mohammed90 added a commit to cedricziel/caddy that referenced this pull request Aug 29, 2025
* log: default logger should respect `{in,ex}clude`

Signed-off-by: Mohammed Al Sahaf <msaa1990@gmail.com>

* add tests

Signed-off-by: Mohammed Al Sahaf <msaa1990@gmail.com>

---------

Signed-off-by: Mohammed Al Sahaf <msaa1990@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 🐞 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants