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

Method SetFormatter

logger.go:384–388  ·  view source on GitHub ↗

SetFormatter sets the logger formatter.

(formatter Formatter)

Source from the content-addressed store, hash-verified

382
383// SetFormatter sets the logger formatter.
384func (logger *Logger) SetFormatter(formatter Formatter) {
385 logger.mu.Lock()
386 defer logger.mu.Unlock()
387 logger.Formatter = formatter
388}
389
390// SetOutput sets the logger output.
391func (logger *Logger) SetOutput(output io.Writer) {

Callers 4

TestEntryFormatterRaceFunction · 0.80
TestLogger_LogFnFunction · 0.80
SetFormatterFunction · 0.80

Calls 2

LockMethod · 0.80
UnlockMethod · 0.80

Tested by 3

TestEntryFormatterRaceFunction · 0.64
TestLogger_LogFnFunction · 0.64