diff options
Diffstat (limited to 'modules/log/level.go')
-rw-r--r-- | modules/log/level.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/log/level.go b/modules/log/level.go index ab231bd1bd..4b2d4ced41 100644 --- a/modules/log/level.go +++ b/modules/log/level.go @@ -6,10 +6,11 @@ package log import ( "bytes" - "encoding/json" "fmt" "os" "strings" + + jsoniter "github.com/json-iterator/go" ) // Level is the level of the logger @@ -103,6 +104,7 @@ func FromString(level string) Level { // UnmarshalJSON takes text and turns it into a Level func (l *Level) UnmarshalJSON(b []byte) error { var tmp interface{} + json := jsoniter.ConfigCompatibleWithStandardLibrary err := json.Unmarshal(b, &tmp) if err != nil { fmt.Fprintf(os.Stderr, "Err: %v", err) |