Skip to content

Commit 9c3fca3

Browse files
committed
show failed statuses as warning
1 parent 5150860 commit 9c3fca3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/custompluginmonitor/plugin/plugin.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,12 @@ func (p *Plugin) runRules() {
103103

104104
start := time.Now()
105105
exitStatus, message := p.run(*rule)
106+
level := 3
107+
if exitStatus != 0 {
108+
level = 2
109+
}
106110

107-
glog.V(3).Infof("Rule: %+v. Start time: %v. End time: %v. Duration: %v", rule, start, time.Now(), time.Since(start))
111+
glog.V(level).Infof("Rule: %+v. Start time: %v. End time: %v. Duration: %v", rule, start, time.Now(), time.Since(start))
108112

109113
result := cpmtypes.Result{
110114
Rule: rule,

0 commit comments

Comments
 (0)