Merge pull request #4210 from bboreham/log-remote-name
Add queue name to logger for remote writes
This commit is contained in:
commit
fe80dddbc4
|
@ -164,6 +164,8 @@ type QueueManager struct {
|
||||||
func NewQueueManager(logger log.Logger, cfg config.QueueConfig, externalLabels model.LabelSet, relabelConfigs []*config.RelabelConfig, client StorageClient, flushDeadline time.Duration) *QueueManager {
|
func NewQueueManager(logger log.Logger, cfg config.QueueConfig, externalLabels model.LabelSet, relabelConfigs []*config.RelabelConfig, client StorageClient, flushDeadline time.Duration) *QueueManager {
|
||||||
if logger == nil {
|
if logger == nil {
|
||||||
logger = log.NewNopLogger()
|
logger = log.NewNopLogger()
|
||||||
|
} else {
|
||||||
|
logger = log.With(logger, "queue", client.Name())
|
||||||
}
|
}
|
||||||
t := &QueueManager{
|
t := &QueueManager{
|
||||||
logger: logger,
|
logger: logger,
|
||||||
|
|
Loading…
Reference in New Issue