Skip to content

Allow store logger to be configured and update some references to slog default logger#1179

Open
hfoxy wants to merge 2 commits intobenbjohnson:mainfrom
hfoxy:main
Open

Allow store logger to be configured and update some references to slog default logger#1179
hfoxy wants to merge 2 commits intobenbjohnson:mainfrom
hfoxy:main

Conversation

@hfoxy
Copy link

@hfoxy hfoxy commented Mar 3, 2026

Description

Updates the usages of slog.Info|Warn|Error|Debug to use either the currently defined logger on litestream.DB or a newly defined logger on litestream.Store

Motivation and Context

Fixes #1178

How Has This Been Tested?

Ran tests and have deployed this commit to a testing environment with ~27 databases constantly being updated.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (would cause existing functionality to not work as expected)

Checklist

  • My code follows the code style of this project (go fmt, go vet)
  • I have tested my changes (go test ./...)
  • I have updated the documentation accordingly (if needed)

@corylanou
Copy link
Collaborator

Hey! Thanks for this PR. Just a heads up — #1181 was merged and covers all the store.go changes (adding Store.Logger and replacing slog.* calls there).

After a rebase onto main, the remaining diff from this PR should be the 3 db.go changes in verify() (slog.Debugdb.Logger.Debug), which are still valuable and not yet addressed. Would be great to rebase and keep those!

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.

Uses of default slog Logger instead of DB logger

2 participants