Control utils should be called with the same verbose level
at least to manage output to system logs. For example, to
disable unwanted syslog messages in unit tests or to enable
higher debug levels if needed.
New arguments added before '-vconsole:off' because it's
still incovinient to have console output.

Signed-off-by: Ilya Maximets <[email protected]>
---

This could be a part of syslog clean up patch-set [1], but it looks
more like a separate independent feature.

[1] https://mail.openvswitch.org/pipermail/ovs-dev/2018-August/350425.html

 vtep/ovs-vtep.in | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/vtep/ovs-vtep.in b/vtep/ovs-vtep.in
index 98748e4..3383870 100755
--- a/vtep/ovs-vtep.in
+++ b/vtep/ovs-vtep.in
@@ -39,6 +39,7 @@ root_prefix = ""
 
 __pychecker__ = 'no-reuseattr'  # Remove in pychecker >= 0.8.19.
 vlog = ovs.vlog.Vlog("ovs-vtep")
+verbose_args = []
 exiting = False
 
 ps_name = ""
@@ -53,7 +54,7 @@ bfd_ref = {}
 
 
 def call_prog(prog, args_list):
-    cmd = [prog, "-vconsole:off"] + args_list
+    cmd = [prog] + verbose_args + ["-vconsole:off"] + args_list
     creationFlags = 0
     if sys.platform == 'win32':
         creationFlags = 0x08000000  # CREATE_NO_WINDOW
@@ -728,6 +729,10 @@ def main():
     global ps_name
     ps_name = args.ps_name
 
+    global verbose_args
+    if args.verbose:
+        verbose_args = ['-v' + arg for arg in args.verbose]
+
     ovs.daemon.daemonize()
 
     ovs.unixctl.command_register("exit", "", 0, 0, unixctl_exit, None)
-- 
2.7.4

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to