MCPcopy
hub / github.com/rclone/rclone / SetOutput

Method SetOutput

fs/log/slog.go:197–201  ·  view source on GitHub ↗

SetOutput sets a new output handler for the log output. This is for temporarily overriding the output.

(fn outputFn)

Source from the content-addressed store, hash-verified

195//
196// This is for temporarily overriding the output.
197func (h *OutputHandler) SetOutput(fn outputFn) {
198 h.mu.Lock()
199 defer h.mu.Unlock()
200 h.output = append(h.output, fn)
201}
202
203// ResetOutput resets the log output to what is was.
204func (h *OutputHandler) ResetOutput() {

Callers 7

TestSetResetOutputFunction · 0.95
startProgressFunction · 0.45
CaptureOutputFunction · 0.45
RunMethod · 0.45
startSystemdLogFunction · 0.45
startSysLogFunction · 0.45

Calls 2

LockMethod · 0.65
UnlockMethod · 0.65

Tested by 2

TestSetResetOutputFunction · 0.76