Skip to content

Commit

Permalink
Reduce log level
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke-Rogerson committed Mar 25, 2024
1 parent ee8e1a1 commit fd0a74b
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit fd0a74b

Please sign in to comment.