Skip to content

feat: add logadapter package for bridging zerolog to third-party loggers - #12

Merged
patdowney merged 1 commit into
masterfrom
feat/log-adapter
Jul 31, 2026
Merged

patdowney merged 1 commit into
masterfrom
feat/log-adapter

Conversation

@patdowney

Copy link
Copy Markdown
Contributor

Third-party libraries (go-smtp, go-socks5, tcpproxy, and similar) each
expect a logger satisfying a different ad hoc interface (io.Writer,
Printf/Println, or Errorf). Adapter is a single type whose methods
structurally satisfy all of them, so callers construct one zerolog.Logger
with whatever fixed context they want and pass it wherever a foreign
logger interface is required.

Moved here from github.com/dioad/connect/sdk/logadapter since it has no
connect-specific dependencies and dioad/cli is the shared utility module
used across more of the org's repos.

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

Third-party libraries (go-smtp, go-socks5, tcpproxy, and similar) each
expect a logger satisfying a different ad hoc interface (io.Writer,
Printf/Println, or Errorf). Adapter is a single type whose methods
structurally satisfy all of them, so callers construct one zerolog.Logger
with whatever fixed context they want and pass it wherever a foreign
logger interface is required.

Moved here from github.com/dioad/connect/sdk/logadapter since it has no
connect-specific dependencies and dioad/cli is the shared utility module
used across more of the org's repos.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@patdowney
patdowney merged commit 3106162 into master Jul 31, 2026
4 checks passed
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