Skip to content

Commit

Permalink
nit: naming
Browse files Browse the repository at this point in the history
  • Loading branch information
M4tteoP committed Jul 8, 2024
1 parent ec56bc5 commit cf8f47b
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 @@ -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())
})

Expand Down

0 comments on commit cf8f47b

Please sign in to comment.