Unverified Commit 775631f8 authored by Sune Keller's avatar Sune Keller 🐳

Allow both pretty and debug reports simultaneously

Signed-off-by: Sune Keller's avatarSune Keller <absukl@almbrand.dk>
parent 6c6a0309
Pipeline #108359701 passed with stage
in 3 minutes and 33 seconds
......@@ -286,7 +286,8 @@ func main() {
for done := false; !done; {
select {
case <-statusTicker.C:
report(statusContext)
printPrettyReport(statusContext)
printDebugReport(statusContext)
case <-checkTicker.C:
done = check(statusContext)
case s := <-sigChan:
......@@ -389,10 +390,8 @@ func printPrettyReport(ctx statusContextType) {
w.Flush()
}
func report(ctx statusContextType) {
if prettyReport {
printPrettyReport(ctx)
} else if debug {
func printDebugReport(ctx statusContextType) {
if debug {
ctx.mu.RLock()
defer ctx.mu.RUnlock()
log.WithFields(logrus.Fields{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment