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

Allow custom debug logger implementation #330

Closed
anuraaga opened this issue Aug 17, 2022 · 1 comment
Closed

Allow custom debug logger implementation #330

anuraaga opened this issue Aug 17, 2022 · 1 comment

Comments

@anuraaga
Copy link
Contributor

Summary

Allow a custom DebugLogger implementation

Basic example

type envoyDebugLogger {}

func (l *envoyDebugLogger) Info(message string, args ...interface{}) {
  proxywasm.LogInfof(message, args...)
}

Motivation

We would like debug logs to go to Envoy logs when loading coraza as a wasm filter. Currently DebugLogger is a struct and can only direct logs to log.Logger, it would be nice if it were an interface that can have the current implementation or a custom one. @jptosso does this sound reasonable?

@jptosso
Copy link
Member

jptosso commented Aug 18, 2022

Merged #337

@jptosso jptosso closed this as completed Aug 18, 2022
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

2 participants