Skip to content

Tags: gotd/log

Tags

v0.1.0

Toggle v0.1.0's commit message

Verified

This commit was signed with the committer’s verified signature.
ernado Aleksandr Razumov
fix: attribute caller correctly through Helper and slog adapter

Helper's leveled methods add a frame between the call site and the
logger, so caller-computing adapters reported helper.go instead of the
application.

- Add the CallerSkipper optional interface and AddCallerSkip helper.
- Helper applies one extra caller skip to the logger its leveled methods
  use, via AddCallerSkip.
- logslog now captures the caller itself and hands the record to the
  handler (the documented slog wrapping pattern), and implements
  CallerSkipper, so AddSource reports the caller, not the adapter.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

v0.0.1

Toggle v0.0.1's commit message

Verified

This commit was signed with the committer’s verified signature.
ernado Aleksandr Razumov
Add zerolog and logrus adapters

Each backend lives in its own module so its dependency stays out of the
core graph, mirroring logzap. Both implement Wither for native child
loggers and map group attrs to nested objects (empty key inlines).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

logzerolog/v0.1.1

Toggle logzerolog/v0.1.1's commit message

Verified

This commit was signed with the committer’s verified signature.
ernado Aleksandr Razumov
fix: keep caller correct through log.Helper in zap, zerolog, logrus a…

…dapters

The leveled methods on log.Helper add a frame, so after the v0.1.0
direct-caller fix the adapters reported helper.go. Implement
log.CallerSkipper so Helper's extra skip propagates to the backend.

- logzap, logzerolog: WithCallerSkip maps onto the native skip mechanism.
- loglogrus: the caller hook now also skips the gotd/log facade package,
  which covers Helper's frames.

Bump the gotd/log dependency to v0.1.0 for the CallerSkipper API.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

logzerolog/v0.1.0

Toggle logzerolog/v0.1.0's commit message

Verified

This commit was signed with the committer’s verified signature.
ernado Aleksandr Razumov
fix: report correct caller in zap, zerolog, and logrus adapters

Each adapter routed every log call through its own Log method, so the
underlying logger attributed the caller to the adapter source line
instead of the application call site.

- logzap: zap.AddCallerSkip(1) in New
- logzerolog: Event.CallerSkipFrame(1) in Log
- loglogrus: a hook recomputes Entry.Caller from the stack, since logrus
  has no caller-skip option

Each fix has a regression test asserting the reported caller is the
caller's file, not the adapter.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

logzerolog/v0.0.1

Toggle logzerolog/v0.0.1's commit message

Verified

This commit was signed with the committer’s verified signature.
ernado Aleksandr Razumov
chore(logzerolog,loglogrus): bump gotd/log to v0.0.1 and drop local r…

…eplace

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

logzap/v0.1.1

Toggle logzap/v0.1.1's commit message

Verified

This commit was signed with the committer’s verified signature.
ernado Aleksandr Razumov
fix: keep caller correct through log.Helper in zap, zerolog, logrus a…

…dapters

The leveled methods on log.Helper add a frame, so after the v0.1.0
direct-caller fix the adapters reported helper.go. Implement
log.CallerSkipper so Helper's extra skip propagates to the backend.

- logzap, logzerolog: WithCallerSkip maps onto the native skip mechanism.
- loglogrus: the caller hook now also skips the gotd/log facade package,
  which covers Helper's frames.

Bump the gotd/log dependency to v0.1.0 for the CallerSkipper API.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

logzap/v0.1.0

Toggle logzap/v0.1.0's commit message

Verified

This commit was signed with the committer’s verified signature.
ernado Aleksandr Razumov
fix: report correct caller in zap, zerolog, and logrus adapters

Each adapter routed every log call through its own Log method, so the
underlying logger attributed the caller to the adapter source line
instead of the application call site.

- logzap: zap.AddCallerSkip(1) in New
- logzerolog: Event.CallerSkipFrame(1) in Log
- loglogrus: a hook recomputes Entry.Caller from the stack, since logrus
  has no caller-skip option

Each fix has a regression test asserting the reported caller is the
caller's file, not the adapter.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

logzap/v0.0.1

Toggle logzap/v0.0.1's commit message

Verified

This commit was signed with the committer’s verified signature.
ernado Aleksandr Razumov
chore(logzap): bump gotd/log to v0.0.1 and drop local replace

loglogrus/v0.1.1

Toggle loglogrus/v0.1.1's commit message

Verified

This commit was signed with the committer’s verified signature.
ernado Aleksandr Razumov
fix: keep caller correct through log.Helper in zap, zerolog, logrus a…

…dapters

The leveled methods on log.Helper add a frame, so after the v0.1.0
direct-caller fix the adapters reported helper.go. Implement
log.CallerSkipper so Helper's extra skip propagates to the backend.

- logzap, logzerolog: WithCallerSkip maps onto the native skip mechanism.
- loglogrus: the caller hook now also skips the gotd/log facade package,
  which covers Helper's frames.

Bump the gotd/log dependency to v0.1.0 for the CallerSkipper API.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

loglogrus/v0.1.0

Toggle loglogrus/v0.1.0's commit message

Verified

This commit was signed with the committer’s verified signature.
ernado Aleksandr Razumov
fix: report correct caller in zap, zerolog, and logrus adapters

Each adapter routed every log call through its own Log method, so the
underlying logger attributed the caller to the adapter source line
instead of the application call site.

- logzap: zap.AddCallerSkip(1) in New
- logzerolog: Event.CallerSkipFrame(1) in Log
- loglogrus: a hook recomputes Entry.Caller from the stack, since logrus
  has no caller-skip option

Each fix has a regression test asserting the reported caller is the
caller's file, not the adapter.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>