[VOL-3199] Added support for dynamic enable/disable of Trace Publishing
Change-Id: I8e7386e6a0b509b366af17ed9bf5021b66ff5446
diff --git a/cmd/openolt-adapter/main.go b/cmd/openolt-adapter/main.go
index 14738df..038af15 100644
--- a/cmd/openolt-adapter/main.go
+++ b/cmd/openolt-adapter/main.go
@@ -99,6 +99,7 @@
// Setup Log Config
cm := conf.NewConfigManager(ctx, a.kvClient, a.config.KVStoreType, a.config.KVStoreAddress, a.config.KVStoreTimeout)
go conf.StartLogLevelConfigProcessing(cm, ctx)
+ go conf.StartLogFeaturesConfigProcessing(cm, ctx)
// Setup Kafka Client
if a.kafkaClient, err = newKafkaClient(ctx, "sarama", a.config.KafkaAdapterAddress); err != nil {
@@ -516,7 +517,7 @@
probeCtx := context.WithValue(ctx, probe.ProbeContextKey, p)
- closer, err := log.InitTracingAndLogCorrelation(cf.TraceEnabled, cf.TraceAgentAddress, cf.LogCorrelationEnabled)
+ closer, err := log.GetGlobalLFM().InitTracingAndLogCorrelation(cf.TraceEnabled, cf.TraceAgentAddress, cf.LogCorrelationEnabled)
if err != nil {
logger.Warnw(ctx, "unable-to-initialize-tracing-and-log-correlation-module", log.Fields{"error": err})
} else {