Dont hard code trace level name

This commit is contained in:
Don 2019-10-11 15:50:57 -07:00
parent c4d3e25a63
commit 537cb2c489

View File

@ -11,6 +11,7 @@ import (
"net/http" "net/http"
"time" "time"
"github.com/sirupsen/logrus"
"github.com/urfave/cli" "github.com/urfave/cli"
) )
@ -65,7 +66,7 @@ func NetworkFromContext(ctx *cli.Context) Network {
// Create the context // Create the context
context := context.Background() context := context.Background()
if ctx.String(logLevelFlag) == "trace" { if ctx.String(logLevelFlag) == logrus.TraceLevel.String() {
context = traceHTTP(context) context = traceHTTP(context)
} }