Skip to content

feat(log): migrate to github.com/gotd/log abstraction#1770

Merged
ernado merged 4 commits into
mainfrom
feat/update-schema
Jun 12, 2026
Merged

feat(log): migrate to github.com/gotd/log abstraction#1770
ernado merged 4 commits into
mainfrom
feat/update-schema

Conversation

@ernado

@ernado ernado commented Jun 12, 2026

Copy link
Copy Markdown
Member

Summary

  • Replace go.uber.org/zap (*zap.Logger) with the github.com/gotd/log Logger/Helper interface across all production code, test support files, cmd binaries, and examples
  • Add github.com/gotd/log/logzap as a direct dependency; wire replace directives in go.mod and examples/go.mod
  • Test files that need real zap output wrap via logzap.New(zaptest.NewLogger(t)); no-op helpers use log.For(log.Nop)
  • Includes the previously accumulated commits: schema layer update, rich message builder/parsers, tgtest personal-messages service

Fix #128

Test plan

  • go build ./... passes (main module and examples module)
  • go test ./... passes with no failures
  • No go.uber.org/zap imports remain in production (non-test) files

🤖 Generated with Claude Code

ernado and others added 3 commits June 12, 2026 17:28
Replace go.uber.org/zap (*zap.Logger) with the github.com/gotd/log
Logger/Helper interface across all production code, tests, cmd binaries,
and examples. Callers that need zap for test observability wrap via
logzap.New(); the gotd/log/logzap replace directive is wired in go.mod.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Drop local replace directives now that both modules are published.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 67.60870% with 149 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.07%. Comparing base (d5d35d9) to head (ce8d78e).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
telegram/updates/state.go 26.47% 25 Missing ⚠️
telegram/updates/state_channel.go 19.04% 17 Missing ⚠️
telegram/updates/state_apply.go 0.00% 13 Missing ⚠️
telegram/calls/connection.go 33.33% 10 Missing ⚠️
telegram/updates/access_hash_feeder.go 9.09% 10 Missing ⚠️
mtproto/bind.go 57.14% 9 Missing ⚠️
mtproto/connect.go 65.00% 7 Missing ⚠️
telegram/updates/config.go 22.22% 7 Missing ⚠️
telegram/calls/call.go 40.00% 6 Missing ⚠️
pool/pool.go 80.76% 5 Missing ⚠️
... and 22 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1770      +/-   ##
==========================================
- Coverage   71.20%   71.07%   -0.14%     
==========================================
  Files         500      501       +1     
  Lines       23476    23500      +24     
==========================================
- Hits        16717    16703      -14     
- Misses       5535     5570      +35     
- Partials     1224     1227       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ernado ernado merged commit 6ac0462 into main Jun 12, 2026
12 checks passed
@ernado ernado deleted the feat/update-schema branch June 12, 2026 14:45
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.

Accept interface instead of *zap.Logger

1 participant