Skip to content

feat: use log/slog for internal diagnostics - #53

Merged
taciturnaxolotl merged 1 commit into
masterfrom
slog-errors
Jul 30, 2026
Merged

feat: use log/slog for internal diagnostics#53
taciturnaxolotl merged 1 commit into
masterfrom
slog-errors

Conversation

@taciturnaxolotl

@taciturnaxolotl taciturnaxolotl commented Jul 30, 2026

Copy link
Copy Markdown
Member

Replaces silently swallowed errors and stale TODO: log ... comments with structured log/slog calls across tcpip.go and session.go.

No new API surface or dependencies. Users who want diagnostics set their own slog handler (e.g. charmbracelet/log); users who don't see nothing, since slog's default handler discards below Info.

Sites covered:

  • tcpip.go — forward/cancel request parse failures, reverse forward listen failures, accept failures, forwarded channel open failures
  • session.go — session channel accept failures, unknown session requests (debug)

PTTY copy errors are intentionally left silent since client disconnects make them noisy.

Addresses gliderlabs#254, gliderlabs#96, gliderlabs#10.

Replace swallowed errors and TODO comments with structured log/slog
calls. No new API surface: users who want diagnostics set their own
slog handler (e.g. charmbracelet/log), users who don't see nothing.

Addresses gliderlabs#254, gliderlabs#96, gliderlabs#10.
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 30508246940

Coverage decreased (-0.05%) to 61.905%

Details

  • Coverage decreased (-0.05%) from the base build.
  • Patch coverage: 13 uncovered changes across 2 files (0 of 13 lines covered, 0.0%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
session.go 8 0 0.0%
tcpip.go 5 0 0.0%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 1260
Covered Lines: 780
Line Coverage: 61.9%
Coverage Strength: 588.89 hits per line

💛 - Coveralls

@taciturnaxolotl
taciturnaxolotl merged commit 53a33ab into master Jul 30, 2026
10 checks passed
@taciturnaxolotl
taciturnaxolotl deleted the slog-errors branch July 30, 2026 03:12
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.

2 participants