Skip to content

Commit

Permalink
change logger
Browse files Browse the repository at this point in the history
  • Loading branch information
wilguo committed May 8, 2024
1 parent 8aa350a commit 232800a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/storage/tsdb/bucketindex/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (

"github.com/cortexproject/cortex/pkg/storage/bucket"
"github.com/cortexproject/cortex/pkg/util"
util_log "github.com/cortexproject/cortex/pkg/util/log"
"github.com/cortexproject/cortex/pkg/util/services"
)

Expand Down Expand Up @@ -93,7 +94,7 @@ func NewLoader(cfg LoaderConfig, bucketClient objstore.Bucket, cfgProvider bucke
// index if available, or load it from the bucket otherwise.
func (l *Loader) GetIndex(ctx context.Context, userID string) (*Index, Status, error) {
if ctx.Err() != nil {
level.Warn(l.logger).Log("msg", "received context error when attempting to load bucket index", "err", ctx.Err())
level.Warn(util_log.WithContext(ctx, l.logger)).Log("msg", "received context error when attempting to load bucket index", "err", ctx.Err())
return nil, UnknownStatus, ctx.Err()
}

Expand Down

0 comments on commit 232800a

Please sign in to comment.