Codebase list golang-github-go-kit-kit / 0c243515-0bf2-4b25-8735-9c1038fa7c1b/upstream/0.12.0 log / logfmt_logger.go
0c243515-0bf2-4b25-8735-9c1038fa7c1b/upstream/0.12.0

Tree @0c243515-0bf2-4b25-8735-9c1038fa7c1b/upstream/0.12.0 (Download .tar.gz)

logfmt_logger.go @0c243515-0bf2-4b25-8735-9c1038fa7c1b/upstream/0.12.0raw · 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)
}