Skip to content

Commit

Permalink
removed hardcoded trace level setting (#1165)
Browse files Browse the repository at this point in the history
Signed-off-by: Mikhail Avramenko <avramenkomihail15@gmail.com>
  • Loading branch information
Mixaster995 authored Nov 17, 2021
1 parent 9fa0d2f commit f62d805
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pkg/networkservice/core/trace/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ func TestTraceOutput(t *testing.T) {
logrus.SetFormatter(&logrus.TextFormatter{
DisableTimestamp: true,
})
logrus.SetLevel(logrus.TraceLevel)
log.EnableTracing(true)

// Create a chain with modifying elements
Expand Down Expand Up @@ -166,6 +167,7 @@ func TestErrorOutput(t *testing.T) {
logrus.SetFormatter(&logrus.TextFormatter{
DisableTimestamp: true,
})
logrus.SetLevel(logrus.TraceLevel)
log.EnableTracing(true)

// Create a chain with modifying elements
Expand Down
1 change: 0 additions & 1 deletion pkg/tools/log/logruslogger/logruslogger.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ func New(ctx context.Context) log.Logger {
func FromSpan(ctx context.Context, span opentracing.Span, operation string) (context.Context, log.Logger, func()) {
entry := logrus.WithFields(log.Fields(ctx))
entry.Logger.SetFormatter(newFormatter())
entry.Logger.SetLevel(logrus.TraceLevel)

var info *traceCtxInfo
ctx, info = withTraceInfo(ctx)
Expand Down

0 comments on commit f62d805

Please sign in to comment.