From 7f84bf6e039cb80eda5cc5137be72cd28ebc7138 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Wed, 20 Jan 2016 12:31:03 -0800 Subject: [PATCH] 99 bottles example trace logging was not being output When 'v' was provided as a last argument trace logging is supposed to be enabled, but it seems like due to the prior configuration of ERROR level it was not so this fixes that and only configures the ERROR level if verbose argument is not present. Change-Id: I527ab1868e4eb5544e0f502e655ba8fcc5913014 --- taskflow/examples/99_bottles.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/taskflow/examples/99_bottles.py b/taskflow/examples/99_bottles.py index 328d6fdf..b0588e1b 100644 --- a/taskflow/examples/99_bottles.py +++ b/taskflow/examples/99_bottles.py @@ -32,6 +32,7 @@ sys.path.insert(0, top_dir) from taskflow.conductors import backends as conductor_backends from taskflow import engines from taskflow.jobs import backends as job_backends +from taskflow import logging as taskflow_logging from taskflow.patterns import linear_flow as lf from taskflow.persistence import backends as persistence_backends from taskflow.persistence import logbook @@ -220,14 +221,15 @@ def check_for_zookeeper(timeout=1): def main(): - logging.basicConfig(level=logging.ERROR) if not check_for_zookeeper(): return if len(sys.argv) == 1: main_local() elif sys.argv[1] in ('p', 'c'): if sys.argv[-1] == "v": - logging.basicConfig(level=5) + logging.basicConfig(level=taskflow_logging.TRACE) + else: + logging.basicConfig(level=logging.ERROR) if sys.argv[1] == 'p': run_poster() else: