Skip to content

Commit

Permalink
nit: naming
Browse files Browse the repository at this point in the history
  • Loading branch information
M4tteoP committed Apr 2, 2024
1 parent d7b5759 commit 708dcae
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions internal/auditlog/serial_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}
})
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ import (

func main() {
operators.Register()
auditlog.RegisterWasmSerialWriter()
auditlog.RegisterProxyWasmSerialWriter()
proxywasm.SetVMContext(wasmplugin.NewVMContext())
}
2 changes: 1 addition & 1 deletion main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1336,7 +1336,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())
})

Expand Down

0 comments on commit 708dcae

Please sign in to comment.