diff --git a/pkg/tools/log/logger.go b/pkg/tools/log/logger.go index bbc20ce4a..6522fda40 100644 --- a/pkg/tools/log/logger.go +++ b/pkg/tools/log/logger.go @@ -20,6 +20,8 @@ package log import ( "context" "sync/atomic" + + "github.com/sirupsen/logrus" ) type contextKeyType string @@ -77,7 +79,8 @@ func WithLog(ctx context.Context, log ...Logger) context.Context { // IsTracingEnabled - checks if it is allowed to use traces func IsTracingEnabled() bool { - return atomic.LoadInt32(&isTracingEnabled) != 0 + // TODO: Rework this within https://github.com/networkservicemesh/sdk/issues/1272 + return atomic.LoadInt32(&isTracingEnabled) != 0 && logrus.GetLevel() == logrus.TraceLevel } // EnableTracing - enable/disable traces