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

Drop logger, logLevel and use coraza's #70

Open
jcchavezs opened this issue Jun 10, 2023 · 0 comments · May be fixed by #75
Open

Drop logger, logLevel and use coraza's #70

jcchavezs opened this issue Jun 10, 2023 · 0 comments · May be fixed by #75

Comments

@jcchavezs
Copy link
Member

Right now this connector spins up a new zap logger on bootstrap. Spawning a new zap logger for a connector is overkill, more so when the transactions carry a logger that are controlled by the directives log level (so it is consistent) and it is efficient when it comes to allocation. Removing a dependency is usually a good practice.

Lines https://github.com/corazawaf/coraza-spoa/blob/main/internal/spoa.go#L175-L193 should be removed. In case spoe has a logger we could plug that into WAF setup (e.g. https://github.com/corazawaf/coraza-caddy/blob/main/logger.go), otherwise we should follow and use the default WAF logger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant