MCPcopy
hub / github.com/grafana/dskit / NewGoKitWithWriter

Function NewGoKitWithWriter

log/gokit.go:43–45  ·  view source on GitHub ↗

NewGoKitWithWriter creates a new GoKit logger with the given format and writer. The input writer must be provided, must be thread-safe, and the caller is expected to guarantee these requirements. If the given format is empty or unknown, logfmt is used. No additional fields nor filters are added to t

(format string, writer io.Writer)

Source from the content-addressed store, hash-verified

41// No additional fields nor filters are added to the created logger, and
42// if they are required, the caller is expected to add them.
43func NewGoKitWithWriter(format string, writer io.Writer) log.Logger {
44 return newGoKit(format, writer)
45}
46
47func newGoKit(format string, writer io.Writer) log.Logger {
48 if format == JSONFormat {

Calls 1

newGoKitFunction · 0.85