From 6bf4ec6dece57ea8f32aeeb83847d266cf8f7f89 Mon Sep 17 00:00:00 2001 From: ionutboangiu Date: Mon, 2 May 2022 18:23:53 +0300 Subject: [PATCH] Change logger name from *export to *ees --- engine/logger.go | 2 +- engine/logger_test.go | 2 +- utils/consts.go | 43 +++++++++++++++++++++---------------------- 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/engine/logger.go b/engine/logger.go index fa0225946..bbb4d87e5 100644 --- a/engine/logger.go +++ b/engine/logger.go @@ -29,7 +29,7 @@ import ( func NewLogger(loggerType, tenant, nodeID string, level int, connMgr *ConnManager, eesConns []string) (utils.LoggerInterface, error) { switch loggerType { - case utils.MetaExportLog: + case utils.MetaEEs: return NewExportLogger(nodeID, tenant, level, connMgr, eesConns), nil default: return utils.NewLogger(loggerType, nodeID, level) diff --git a/engine/logger_test.go b/engine/logger_test.go index 6d6616e99..5d7042b87 100644 --- a/engine/logger_test.go +++ b/engine/logger_test.go @@ -41,7 +41,7 @@ func TestLoggerNewLoggerExport(t *testing.T) { nodeID: "123", tenant: "cgrates.org", } - if rcv, err := NewLogger(utils.MetaExportLog, "cgrates.org", "123", 7, cM, []string{eesConn}); err != nil { + if rcv, err := NewLogger(utils.MetaEEs, "cgrates.org", "123", 7, cM, []string{eesConn}); err != nil { t.Error(err) } else if !reflect.DeepEqual(rcv.(*ExportLogger), exp) { t.Errorf("expected: <%+v>, \nreceived: <%+v>", exp, rcv) diff --git a/utils/consts.go b/utils/consts.go index af9692c7f..cae0f2af9 100644 --- a/utils/consts.go +++ b/utils/consts.go @@ -421,28 +421,27 @@ const ( ConnBlocker = "ConnBlocker" ConnParameters = "ConnParameters" - Thresholds = "Thresholds" - Routes = "Routes" - Attributes = "Attributes" - Chargers = "Chargers" - Dispatchers = "Dispatchers" - StatS = "StatS" - LoadIDsVrs = "LoadIDs" - GlobalVarS = "GlobalVarS" - CostSource = "CostSource" - ExtraInfo = "ExtraInfo" - Meta = "*" - MetaExportLog = "*export" - MetaSysLog = "*syslog" - MetaStdLog = "*stdout" - EventSource = "EventSource" - AccountID = "AccountID" - AccountIDs = "AccountIDs" - ResourceID = "ResourceID" - TotalUsage = "TotalUsage" - StatID = "StatID" - BalanceType = "BalanceType" - BalanceID = "BalanceID" + Thresholds = "Thresholds" + Routes = "Routes" + Attributes = "Attributes" + Chargers = "Chargers" + Dispatchers = "Dispatchers" + StatS = "StatS" + LoadIDsVrs = "LoadIDs" + GlobalVarS = "GlobalVarS" + CostSource = "CostSource" + ExtraInfo = "ExtraInfo" + Meta = "*" + MetaSysLog = "*syslog" + MetaStdLog = "*stdout" + EventSource = "EventSource" + AccountID = "AccountID" + AccountIDs = "AccountIDs" + ResourceID = "ResourceID" + TotalUsage = "TotalUsage" + StatID = "StatID" + BalanceType = "BalanceType" + BalanceID = "BalanceID" //BalanceDestinationIds = "BalanceDestinationIds" BalanceCostIncrements = "BalanceCostIncrements" BalanceAttributeIDs = "BalanceAttributeIDs"