MCPcopy
hub / github.com/rs/zerolog / Logger

Struct Logger

log.go:229–237  ·  view source on GitHub ↗

A Logger represents an active logging object that generates lines of JSON output to an io.Writer. Each logging operation makes a single call to the Writer's Write method. There is no guarantee on access serialization to the Writer. If your Writer is not thread safe, you may consider a sync wrapper.

Source from the content-addressed store, hash-verified

227// serialization to the Writer. If your Writer is not thread safe,
228// you may consider a sync wrapper.
229type Logger struct {
230 w LevelWriter
231 level Level
232 sampler Sampler
233 context []byte
234 hooks []Hook
235 stack bool
236 ctx context.Context
237}
238
239// New creates a root logger with given output writer. If the output writer implements
240// the LevelWriter interface, the WriteLevel method will be called instead of the Write

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected