MCPcopy Create free account
hub / github.com/ContentSquare/chproxy / SuppressOutput

Function SuppressOutput

log/log.go:29–39  ·  view source on GitHub ↗

SuppressOutput suppresses all output from logs if `suppress` is true used while testing

(suppress bool)

Source from the content-addressed store, hash-verified

27// SuppressOutput suppresses all output from logs if `suppress` is true
28// used while testing
29func SuppressOutput(suppress bool) {
30 if suppress {
31 debugLogger.SetOutput(io.Discard)
32 infoLogger.SetOutput(io.Discard)
33 errorLogger.SetOutput(io.Discard)
34 } else {
35 debugLogger.SetOutput(os.Stderr)
36 infoLogger.SetOutput(os.Stderr)
37 errorLogger.SetOutput(os.Stderr)
38 }
39}
40
41var debug uint32
42

Callers 1

TestMainFunction · 0.92

Calls

no outgoing calls

Tested by 1

TestMainFunction · 0.74