From 93d63dd0636605bffab9e7591aea810a0254abc7 Mon Sep 17 00:00:00 2001 From: liuh-80 Date: Fri, 22 Nov 2024 05:31:04 +0000 Subject: [PATCH] Add swss-common log level support to gnmi --- telemetry/telemetry.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/telemetry/telemetry.go b/telemetry/telemetry.go index f310a4d7..4ebf6857 100644 --- a/telemetry/telemetry.go +++ b/telemetry/telemetry.go @@ -26,6 +26,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials" "google.golang.org/grpc/keepalive" + "github.com/sonic-net/sonic-gnmi/swsscommon" ) type ServerControlValue int @@ -88,6 +89,9 @@ func runTelemetry(args []string) error { return err } + // enable swss-common debug level + swsscommon.LoggerLinkToDbNative("telemetry") + var wg sync.WaitGroup // serverControlSignal channel is a channel that will be used to notify gnmi server to start, stop, restart, depending of syscall or cert updates var serverControlSignal = make(chan ServerControlValue, 1)