mirror of
https://github.com/thegeeklab/wp-plugin-go.git
synced 2024-11-25 09:30:39 +00:00
Dont hard code trace level name
This commit is contained in:
parent
c4d3e25a63
commit
537cb2c489
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user