Skip to content

Commit

Permalink
ovs-vtep: Pass log level arguments to underlying utils.
Browse files Browse the repository at this point in the history
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 inconvenient to have console output.

Signed-off-by: Ilya Maximets <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
igsilya authored and blp committed Aug 6, 2018
1 parent b3d7deb commit a3241d3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion vtep/ovs-vtep.in
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit a3241d3

Please sign in to comment.