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

Function NewCore

zapcore/core.go:58–64  ·  view source on GitHub ↗

NewCore creates a Core that writes logs to a WriteSyncer.

(enc Encoder, ws WriteSyncer, enab LevelEnabler)

Source from the content-addressed store, hash-verified

56
57// NewCore creates a Core that writes logs to a WriteSyncer.
58func NewCore(enc Encoder, ws WriteSyncer, enab LevelEnabler) Core {
59 return &ioCore{
60 LevelEnabler: enab,
61 enc: enc,
62 out: ws,
63 }
64}
65
66type ioCore struct {
67 LevelEnabler

Callers 15

withBenchedLoggerFunction · 0.92
BenchmarkAddCallerHookFunction · 0.92
Benchmark100FieldsFunction · 0.92
TestSugarWithCapturesFunction · 0.92
TestLoggerWithCapturesFunction · 0.92
TestLoggerWriteFailureFunction · 0.92
TestLoggerSyncFailFunction · 0.92
NewExampleFunction · 0.92
ExampleAtomicLevelFunction · 0.92
BuildMethod · 0.92

Calls

no outgoing calls

Tested by 15

withBenchedLoggerFunction · 0.74
BenchmarkAddCallerHookFunction · 0.74
Benchmark100FieldsFunction · 0.74
TestSugarWithCapturesFunction · 0.74
TestLoggerWithCapturesFunction · 0.74
TestLoggerWriteFailureFunction · 0.74
TestLoggerSyncFailFunction · 0.74
ExampleAtomicLevelFunction · 0.74
withLoggerFunction · 0.74
TestSlogtestFunction · 0.74