From f77809e793458959a142305aeff184496a5b282e Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Wed, 30 Sep 2020 14:47:05 -0700 Subject: [PATCH] Add top docstring and log format like Etiquette. --- frontends/ycdl_flask/ycdl_flask_launch.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/frontends/ycdl_flask/ycdl_flask_launch.py b/frontends/ycdl_flask/ycdl_flask_launch.py index 499b55a..c0aa19f 100644 --- a/frontends/ycdl_flask/ycdl_flask_launch.py +++ b/frontends/ycdl_flask/ycdl_flask_launch.py @@ -1,7 +1,16 @@ +''' +This file is the gevent launcher for local / development use. + +Simply run it on the command line: +python ycdl_flask_launch.py [port] +''' import gevent.monkey; gevent.monkey.patch_all() import logging -logging.basicConfig() +handler = logging.StreamHandler() +log_format = '{levelname}:ycdl.{module}.{funcName}: {message}' +handler.setFormatter(logging.Formatter(log_format, style='{')) +logging.getLogger().addHandler(handler) logging.getLogger('ycdl').setLevel(logging.DEBUG) import argparse