Skip to content

Conversation

@fclairamb
Copy link
Owner

Summary

This PR migrates the entire codebase from github.com/go-kit/log and github.com/fclairamb/go-log to Go's standard library log/slog.

Changes

Core Migration

  • main.go: Now uses slog.Default() and slog.New() directly for logger initialization
  • server/server.go: Changed logger field from log.Logger interface to *slog.Logger
  • config/config.go: All functions now accept *slog.Logger instead of log.Logger
  • fs/fs.go: LoadFs() function now accepts *slog.Logger
  • fs/fslog/fslog.go: All logger fields converted to *slog.Logger
  • fs/telegram/telegram.go: Logger field is now *slog.Logger
  • fs/gdrive/gdrive.go: LoadFs() now accepts *slog.Logger

Dependencies

  • ✅ Removed github.com/go-kit/log completely
  • ✅ Removed all direct imports of github.com/fclairamb/go-log
  • ℹ️ go-log remains as indirect dependency (required by afero-snd)

Third-Party Integration

  • Set logger to nil for afero-snd (sync-and-delete filesystem)
  • Removed logger assignment for afero-gdrive (uses internal default)

Testing

  • ✅ All tests pass: go test -race -v ./...
  • ✅ Build successful: go build -v ./...
  • ✅ No direct usage of go-log or go-kit/log in source code

Impact

  • Breaking Change: None (internal refactoring only)
  • Performance: No impact expected
  • Logging Output: Uses slog's text handler format instead of logfmt

🤖 Generated with Claude Code

renovate bot and others added 2 commits December 26, 2025 21:03
Replace all logging infrastructure from github.com/go-kit/log and
github.com/fclairamb/go-log with Go's standard library log/slog.

Changes:
- Replace all log.Logger interfaces with *slog.Logger throughout codebase
- Update main.go to use slog.Default() and slog.New() directly
- Update server, config, and all fs packages to use *slog.Logger
- Remove go-kit/log dependency completely
- Remove direct usage of go-log abstraction layer
- Set logger to nil for afero-snd and afero-gdrive integrations

The go-log package remains as an indirect dependency (required by
afero-snd) but is no longer imported or used directly in the codebase.

All tests pass and build succeeds.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
@fclairamb fclairamb merged commit da80235 into main Dec 26, 2025
4 checks passed
@fclairamb fclairamb deleted the chore/switch-to-slog branch December 26, 2025 21:41
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