Skip to content

Commit 473dcfd

Browse files
committed
Log ovs dump-flows at 5, not 4
Most dump-flows calls are part of health checks and don't normally need to be logged about unless they fail.
1 parent 928f1cd commit 473dcfd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/util/ovs/ovs.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,17 @@ func New(execer exec.Interface, bridge string, minVersion string) (Interface, er
139139
}
140140

141141
func (ovsif *ovsExec) exec(cmd string, args ...string) (string, error) {
142+
logLevel := glog.Level(4)
142143
switch cmd {
143144
case OVS_OFCTL:
145+
if args[0] == "dump-flows" {
146+
logLevel = glog.Level(5)
147+
}
144148
args = append([]string{"-O", "OpenFlow13"}, args...)
145149
case OVS_VSCTL:
146150
args = append([]string{"--timeout=30"}, args...)
147151
}
148-
glog.V(4).Infof("Executing: %s %s", cmd, strings.Join(args, " "))
152+
glog.V(logLevel).Infof("Executing: %s %s", cmd, strings.Join(args, " "))
149153

150154
output, err := ovsif.execer.Command(cmd, args...).CombinedOutput()
151155
if err != nil {

0 commit comments

Comments
 (0)