Codebase list golang-github-go-kit-kit / run/d2f2902b-79c4-43cd-8c09-341e33fc6017/upstream log / logfmt_logger.go
run/d2f2902b-79c4-43cd-8c09-341e33fc6017/upstream

Tree @run/d2f2902b-79c4-43cd-8c09-341e33fc6017/upstream (Download .tar.gz)

logfmt_logger.go @run/d2f2902b-79c4-43cd-8c09-341e33fc6017/upstreamraw · history · blame

package log

import (
	"io"

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

// NewLogfmtLogger returns a logger that encodes keyvals to the Writer in
// logfmt format. 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 NewLogfmtLogger(w io.Writer) Logger {
	return log.NewLogfmtLogger(w)
}