From 32efcaff8b0de30b7f3abb56dd195695530bcbfe Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Fri, 4 Nov 2016 13:59:20 +0800 Subject: bin: Update "log_stream" and "loglevel" handling * bin/fg21sim: Simplify the "log_stream" assignment * bin/fg21sim-webui: Also enable debug logging when turning on debug flag for the tornado; also update the docstring a little. --- bin/fg21sim-webui | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'bin/fg21sim-webui') diff --git a/bin/fg21sim-webui b/bin/fg21sim-webui index 225aeed..8fc7673 100755 --- a/bin/fg21sim-webui +++ b/bin/fg21sim-webui @@ -5,8 +5,8 @@ # MIT license """ -Start (and control) the Web user interface (UI) of "fg21sim", -which is based upon Tornado_ and uses WebSocket_. +Start (and/or control) the Web user interface (UI) of "fg21sim", +which is built using the Tornado_ web server and WebSocket_ protocol. .. _Tornado: http://www.tornadoweb.org/ @@ -35,7 +35,8 @@ def main(): help="enable Tornado debug mode") args = parser.parse_args() - setup_logging(dict_config=configs.logging) + loglevel = "DEBUG" if args.debug else None + setup_logging(dict_config=configs.logging, level=loglevel) tool = os.path.basename(sys.argv[0]) logger = logging.getLogger(tool) logger.info("COMMAND: {0}".format(" ".join(sys.argv))) -- cgit v1.2.2