[VOL-2028] Corrected inconsistent log field naming for instanceId
Change-Id: I25ec5eccaadbb2baf3acd55512d6222ec418f7e1
diff --git a/main.go b/main.go
index af7ca2e..e357e2e 100644
--- a/main.go
+++ b/main.go
@@ -322,12 +322,12 @@
// Setup logging
// Setup default logger - applies for packages that do not have specific logger set
- if _, err := log.SetDefaultLogger(log.JSON, cf.LogLevel, log.Fields{"instanceID": cf.InstanceID}); err != nil {
+ if _, err := log.SetDefaultLogger(log.JSON, cf.LogLevel, log.Fields{"instanceId": cf.InstanceID}); err != nil {
log.With(log.Fields{"error": err}).Fatal("Cannot setup logging")
}
// Update all loggers (provisionned via init) with a common field
- if err := log.UpdateAllLoggers(log.Fields{"instanceID": cf.InstanceID}); err != nil {
+ if err := log.UpdateAllLoggers(log.Fields{"instanceId": cf.InstanceID}); err != nil {
log.With(log.Fields{"error": err}).Fatal("Cannot setup logging")
}
@@ -361,5 +361,5 @@
ad.stop()
elapsed := time.Since(start)
- log.Infow("run-time", log.Fields{"instanceID": ad.config.InstanceID, "time": elapsed / time.Second})
+ log.Infow("run-time", log.Fields{"instanceId": ad.config.InstanceID, "time": elapsed / time.Second})
}