SuppressOutput suppresses all output from logs if `suppress` is true used while testing
(suppress bool)
| 27 | // SuppressOutput suppresses all output from logs if `suppress` is true |
| 28 | // used while testing |
| 29 | func 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 | |
| 41 | var debug uint32 |
| 42 |