diff --git a/internal/auditlog/serial_writer.go b/internal/auditlog/serial_writer.go index 799848c..54dd7a2 100644 --- a/internal/auditlog/serial_writer.go +++ b/internal/auditlog/serial_writer.go @@ -11,9 +11,9 @@ import ( "github.com/tetratelabs/proxy-wasm-go-sdk/proxywasm" ) -// This function overrides the default "Serial" audit log writer (see https://github.com/corazawaf/coraza/blob/main/internal/auditlog/init_tinygo.go) +// RegisterProxyWasmSerialWriter overrides the default "Serial" audit log writer (see https://github.com/corazawaf/coraza/blob/main/internal/auditlog/init_tinygo.go) // in order to print audit logs to the proxy-wasm log as info messages with a prefix to differentiate them from other logs. -func RegisterWasmSerialWriter() { +func RegisterProxyWasmSerialWriter() { plugins.RegisterAuditLogWriter("serial", func() plugintypes.AuditLogWriter { return &wasmSerial{} }) diff --git a/main.go b/main.go index 3aa3433..9e1fd49 100644 --- a/main.go +++ b/main.go @@ -13,6 +13,6 @@ import ( func main() { operators.Register() - auditlog.RegisterWasmSerialWriter() + auditlog.RegisterProxyWasmSerialWriter() proxywasm.SetVMContext(wasmplugin.NewVMContext()) } diff --git a/main_test.go b/main_test.go index 49b42d8..975a3fc 100644 --- a/main_test.go +++ b/main_test.go @@ -1413,7 +1413,7 @@ func vmTest(t *testing.T, f func(*testing.T, types.VMContext)) { t.Helper() t.Run("go", func(t *testing.T) { - auditlog.RegisterWasmSerialWriter() + auditlog.RegisterProxyWasmSerialWriter() f(t, wasmplugin.NewVMContext()) })