mirror of
https://github.com/zrepl/zrepl.git
synced 2025-01-02 20:38:50 +01:00
logger: json serialization of log level is a string
This commit is contained in:
parent
03955196a9
commit
7c86628f3b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user