0
0
mirror of https://github.com/thegeeklab/wp-plugin-go.git synced 2024-11-22 00:20:38 +00:00

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"
"time"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
)
@ -65,7 +66,7 @@ func NetworkFromContext(ctx *cli.Context) Network {
// Create the context
context := context.Background()
if ctx.String(logLevelFlag) == "trace" {
if ctx.String(logLevelFlag) == logrus.TraceLevel.String() {
context = traceHTTP(context)
}