Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce log level #162

Merged
merged 1 commit into from
Mar 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions data/redisrepo/pub_sub.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ func (r *redisRepository) PublishEvent(ctx context.Context, key string, value in
return fmt.Errorf("failed to publish redis event: %v", err)
}

logctx.Info(ctx, "published redis event", logger.String("key", key))
logctx.Debug(ctx, "published redis event", logger.String("key", key))
return nil
}

// SubscribeToEvents subscribes to events on a given Redis channel
func (r *redisRepository) SubscribeToEvents(ctx context.Context, channel string) (chan []byte, error) {
logctx.Info(ctx, "subscribing to channel", logger.String("channel", channel))
logctx.Debug(ctx, "subscribing to channel", logger.String("channel", channel))

// Subscribe to the specified channel
pubsub := r.client.Subscribe(ctx, channel)
Expand All @@ -45,7 +45,7 @@ func (r *redisRepository) SubscribeToEvents(ctx context.Context, channel string)
for msg := range ch {
messages <- []byte(msg.Payload)
}
logctx.Info(ctx, "subscription ended", logger.String("channel", channel))
logctx.Debug(ctx, "subscription ended", logger.String("channel", channel))
close(messages)
}()

Expand Down
Loading