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

Method Log

logger.go:229–233  ·  logger.go::Logger.Log

Log logs a message at the specified level. The message includes any fields passed at the log site, as well as any fields accumulated on the logger. Any Fields that require evaluation (such as Objects) are evaluated upon invocation of Log.

(lvl zapcore.Level, msg string, fields ...Field)

Source from the content-addressed store, hash-verified

227// Any Fields that require evaluation (such as Objects) are evaluated upon
228// invocation of Log.
229func (log *Logger) Log(lvl zapcore.Level, msg string, fields ...Field) {
230 if ce := log.check(lvl, msg); ce != nil {
231 ce.Write(fields...)
232 }
233}
234
235// Debug logs a message at DebugLevel. The message includes any fields passed
236// at the log site, as well as any fields accumulated on the logger.

Callers 11

TestLoggerLogPanicFunction · 0.45
TestLoggerLogFatalFunction · 0.45
TestLoggerLogLevelsFunction · 0.45
TestLoggerAlwaysPanicsFunction · 0.45
TestLoggerAlwaysFatalsFunction · 0.45
TestLoggerCustomOnPanicFunction · 0.45
LogfMethod · 0.45
BenchmarkWithoutFieldsFunction · 0.45
BenchmarkAddingFieldsFunction · 0.45

Calls 2

checkMethod · 0.95
WriteMethod · 0.65

Tested by 11

TestLoggerLogPanicFunction · 0.36
TestLoggerLogFatalFunction · 0.36
TestLoggerLogLevelsFunction · 0.36
TestLoggerAlwaysPanicsFunction · 0.36
TestLoggerAlwaysFatalsFunction · 0.36
TestLoggerCustomOnPanicFunction · 0.36
LogfMethod · 0.36
BenchmarkWithoutFieldsFunction · 0.36
BenchmarkAddingFieldsFunction · 0.36