MCPcopy
hub / github.com/uber-go/zap / Logger

Struct Logger

logger.go:41–57  ·  logger.go::Logger

A Logger provides fast, leveled, structured logging. All methods are safe for concurrent use. The Logger is designed for contexts in which every microsecond and every allocation matters, so its API intentionally favors performance and type safety over brevity. For most applications, the SugaredLogg

Source from the content-addressed store, hash-verified

39// safety over brevity. For most applications, the SugaredLogger strikes a
40// better balance between performance and ergonomics.
41type Logger struct {
42 core zapcore.Core
43
44 development bool
45 addCaller bool
46 onPanic zapcore.CheckWriteHook // default is WriteThenPanic
47 onFatal zapcore.CheckWriteHook // default is WriteThenFatal
48
49 name string
50 errorOutput zapcore.WriteSyncer
51
52 addStack zapcore.LevelEnabler
53
54 callerSkip int
55
56 clock zapcore.Clock
57}
58
59// New constructs a new Logger from the provided zapcore.Core and Options. If
60// the passed zapcore.Core is nil, it falls back to using a no-op

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected