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

Method logln

sugar.go:360–369  ·  view source on GitHub ↗

logln message with Sprintln

(lvl zapcore.Level, fmtArgs []interface{}, context []interface{})

Source from the content-addressed store, hash-verified

358
359// logln message with Sprintln
360func (s *SugaredLogger) logln(lvl zapcore.Level, fmtArgs []interface{}, context []interface{}) {
361 if lvl < DPanicLevel && !s.base.Core().Enabled(lvl) {
362 return
363 }
364
365 msg := getMessageln(fmtArgs)
366 if ce := s.base.Check(lvl, msg); ce != nil {
367 ce.Write(s.sweetenFields(context)...)
368 }
369}
370
371// getMessage format with Sprint, Sprintf, or neither.
372func getMessage(template string, fmtArgs []interface{}) string {

Callers 8

LoglnMethod · 0.95
DebuglnMethod · 0.95
InfolnMethod · 0.95
WarnlnMethod · 0.95
ErrorlnMethod · 0.95
DPaniclnMethod · 0.95
PaniclnMethod · 0.95
FatallnMethod · 0.95

Calls 6

sweetenFieldsMethod · 0.95
getMessagelnFunction · 0.85
CoreMethod · 0.80
EnabledMethod · 0.65
CheckMethod · 0.65
WriteMethod · 0.65

Tested by

no test coverage detected