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

Method SetOutput

logger.go:391–395  ·  view source on GitHub ↗

SetOutput sets the logger output.

(output io.Writer)

Source from the content-addressed store, hash-verified

389
390// SetOutput sets the logger output.
391func (logger *Logger) SetOutput(output io.Writer) {
392 logger.mu.Lock()
393 defer logger.mu.Unlock()
394 logger.Out = output
395}
396
397func (logger *Logger) SetReportCaller(reportCaller bool) {
398 logger.mu.Lock()

Callers 8

TestLogger_SetBufferPoolFunction · 0.80
TestReplaceHooksFunction · 0.80
TestWriterSplitNewlinesFunction · 0.80
TestWriterSplitsMax64KBFunction · 0.80
SetOutputFunction · 0.80

Calls 2

LockMethod · 0.80
UnlockMethod · 0.80

Tested by 7

TestLogger_SetBufferPoolFunction · 0.64
TestReplaceHooksFunction · 0.64
TestWriterSplitNewlinesFunction · 0.64
TestWriterSplitsMax64KBFunction · 0.64