Skip to content

refactor(go): make audit logging pluggable, remove zap dependency - #7

Merged
mostafa merged 2 commits into
mainfrom
feat/pluggable-audit
May 9, 2026
Merged

mostafa merged 2 commits into
mainfrom
feat/pluggable-audit

Conversation

@mostafa

@mostafa mostafa commented May 9, 2026

Copy link
Copy Markdown
Member

Summary

  • Replace built-in SlogSink and ZapSink with a minimal AuditFunc function adapter so users can plug in any logger (slog, zap, zerolog, etc.) without the library imposing a dependency.
  • Remove go.uber.org/zap and transitive go.uber.org/multierr from go.mod.
  • Update audit_test.go to cover AuditFunc, MultiSink, DiscardSink, and concurrent emission.

Test plan

  • go test ./... passes
  • golangci-lint run ./... reports zero issues
  • go.mod no longer contains go.uber.org/zap or go.uber.org/multierr

mostafa added 2 commits May 9, 2026 21:27
Replace built-in SlogSink and ZapSink with a minimal AuditFunc adapter
that lets users plug in any logger. This removes the go.uber.org/zap
(and transitive multierr) dependency while keeping the AuditSink
interface, MultiSink, and DiscardSink intact.
@mostafa
mostafa merged commit 936ffee into main May 9, 2026
9 checks passed
@mostafa
mostafa deleted the feat/pluggable-audit branch May 9, 2026 19:34
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

Successfully merging this pull request may close these issues.

1 participant