aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/go-kit/kit/log/json_logger.go
blob: edfde2f4632dc33f217c672749d604b38195c0a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package log

import (
	"io"

	"github.com/go-kit/log"
)

// NewJSONLogger returns a Logger that encodes keyvals to the Writer as a
// single JSON object. Each log event produces no more than one call to
// w.Write. The passed Writer must be safe for concurrent use by multiple
// goroutines if the returned Logger will be used concurrently.
func NewJSONLogger(w io.Writer) Logger {
	return log.NewJSONLogger(w)
}
nihil fit ex nihilo