Browse Source

ligten bucket logger (#2523)

Thibault "bui" Koechlin 1 year ago
parent
commit
6c20d38c41
2 changed files with 1 additions and 3 deletions
  1. 1 1
      pkg/leakybucket/bucket.go
  2. 0 2
      pkg/leakybucket/manager_load.go

+ 1 - 1
pkg/leakybucket/bucket.go

@@ -216,7 +216,7 @@ func LeakRoutine(leaky *Leaky) error {
 	defer BucketsCurrentCount.With(prometheus.Labels{"name": leaky.Name}).Dec()
 
 	/*todo : we create a logger at runtime while we want leakroutine to be up asap, might not be a good idea*/
-	leaky.logger = leaky.BucketConfig.logger.WithFields(log.Fields{"capacity": leaky.Capacity, "partition": leaky.Mapkey, "bucket_id": leaky.Uuid})
+	leaky.logger = leaky.BucketConfig.logger.WithFields(log.Fields{"partition": leaky.Mapkey, "bucket_id": leaky.Uuid})
 
 	//We copy the processors, as they are coming from the BucketFactory, and thus are shared between buckets
 	//If we don't copy, processors using local cache (such as Uniq) are subject to race conditions

+ 0 - 2
pkg/leakybucket/manager_load.go

@@ -284,14 +284,12 @@ func LoadBucket(bucketFactory *BucketFactory, tomb *tomb.Tomb) error {
 		bucketFactory.logger = clog.WithFields(log.Fields{
 			"cfg":  bucketFactory.BucketName,
 			"name": bucketFactory.Name,
-			"file": bucketFactory.Filename,
 		})
 	} else {
 		/* else bind it to the default one (might find something more elegant here)*/
 		bucketFactory.logger = log.WithFields(log.Fields{
 			"cfg":  bucketFactory.BucketName,
 			"name": bucketFactory.Name,
-			"file": bucketFactory.Filename,
 		})
 	}