logger: json serialization of log level is a string

This commit is contained in:
Christian Schwarz 2017-09-24 19:39:44 +02:00
parent 03955196a9
commit 7c86628f3b

View File

@ -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