diff --git a/logger/datastructures.go b/logger/datastructures.go index fc0ff5c..dd62b2e 100644 --- a/logger/datastructures.go +++ b/logger/datastructures.go @@ -2,6 +2,7 @@ package logger import ( "context" + "encoding/json" "fmt" "github.com/pkg/errors" "time" @@ -9,6 +10,10 @@ import ( type Level int +func (l Level) MarshalJSON() ([]byte, error) { + return json.Marshal(l.String()) +} + const ( Debug Level = iota Info