MCPcopy
hub / github.com/sirupsen/logrus / Log

Method Log

entry.go:305–309  ·  view source on GitHub ↗

Log will log a message at the level given as parameter. Warning: using Log at Panic or Fatal level will not respectively Panic nor Exit. For this behaviour Entry.Panic or Entry.Fatal should be used instead.

(level Level, args ...interface{})

Source from the content-addressed store, hash-verified

303// Warning: using Log at Panic or Fatal level will not respectively Panic nor Exit.
304// For this behaviour Entry.Panic or Entry.Fatal should be used instead.
305func (entry *Entry) Log(level Level, args ...interface{}) {
306 if entry.Logger.IsLevelEnabled(level) {
307 entry.log(level, fmt.Sprint(args...))
308 }
309}
310
311func (entry *Entry) Trace(args ...interface{}) {
312 entry.Log(TraceLevel, args...)

Callers 10

TraceMethod · 0.95
DebugMethod · 0.95
InfoMethod · 0.95
WarnMethod · 0.95
ErrorMethod · 0.95
FatalMethod · 0.95
PanicMethod · 0.95
LogfMethod · 0.95
LoglnMethod · 0.95
TestLogFunction · 0.45

Calls 2

logMethod · 0.95
IsLevelEnabledMethod · 0.80

Tested by 1

TestLogFunction · 0.36