Skip to content

Commit

Permalink
Demote spammy INFO logs (querying github, storing X prs, refresh loop)
Browse files Browse the repository at this point in the history
There are a lot of excessive log rows. It should be easy enough to
detect when elly is buggy, and when that happens: stop the running
instance, and run it in the foreground with `-verbose` to see what's up.
  • Loading branch information
chelmertz committed Dec 18, 2024
1 parent 123a99e commit 4d84113
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func graphqlRequest(query, token string, logger *slog.Logger) ([]byte, error) {
return nil, fmt.Errorf("could not construct github request: %w", err)
}

logger.Info("querying github api")
logger.Debug("querying github api")
response, err := httpClient.Do(request)
if err != nil {
return nil, fmt.Errorf("could not request github: %w", err)
Expand Down
2 changes: 1 addition & 1 deletion internal/storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (s *DbStorage) Prs() StoredState {
}

func (s *DbStorage) StoreRepoPrs(orderedPrs []types.ViewPr) error {
s.logger.Info("storing prs", slog.Int("prs", len(orderedPrs)))
s.logger.Debug("storing prs", slog.Int("prs", len(orderedPrs)))

buriedPrs, err := s.db.BuriedPrs(context.Background())
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func startRefreshLoop(token, username string, store storage.Storage, refresh cha
for {
select {
case action := <-refresh:
logger.Info("refresh loop", "action", action)
logger.Debug("refresh loop", "action", action)
switch action {
case types.RefreshStop:
refreshTimer.Stop()
Expand Down

0 comments on commit 4d84113

Please sign in to comment.