-
Notifications
You must be signed in to change notification settings - Fork 40
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
feat: aligns logger with caddy #50
Conversation
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
return true | ||
} | ||
|
||
type noopEvent struct{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the end I think it is worth to export the noop event, maybe as a variable or just the constructor @anuraaga
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems this is because of the level check in this code - I wonder if level checks are supposed to happen at a higher level in coraza (these become just LogWriter or something). Maybe too much to change now.
Another option could be to delegate to noop logger, which is public, instead of returning noopEvent - what about that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checks will happen if we need to adapt logger with an underlying platform logger (in this case zap). I will leave this as it is now and if in the future we need the noop even to be exported we can export.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent. Let's wait for @anuraaga's comment then, but for me this looks good.
This PR aligns the logger with the one provided by caddy (zap).