aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2022-10-27 12:23:51 +0300
committerFrederick Muriuki Muriithi2022-10-28 15:58:01 +0300
commitd28ba52084c276db319173885d81e5a550341cd2 (patch)
tree5bc2a7359033393d501877f07a452e2ce1da3141 /wqflask
parent05628e484fb238cea6ac3267be959b2bb0702c61 (diff)
downloadgenenetwork2-d28ba52084c276db319173885d81e5a550341cd2.tar.gz
Declutter stdout
* wqflask/utility/tools.py: Output extraneous messages to stderr rather than stdout to avoid cluttering the output.
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/utility/tools.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/wqflask/utility/tools.py b/wqflask/utility/tools.py
index fe059015..636bf040 100644
--- a/wqflask/utility/tools.py
+++ b/wqflask/utility/tools.py
@@ -239,20 +239,24 @@ ENDC = '\033[0m'
def show_settings():
from utility.tools import LOG_LEVEL
- print(("Set global log level to " + BLUE + LOG_LEVEL + ENDC))
+ print(("Set global log level to " + BLUE + LOG_LEVEL + ENDC),
+ file=sys.stderr)
log_level = getattr(logging, LOG_LEVEL.upper())
logging.basicConfig(level=log_level)
logger.info(OVERRIDES)
logger.info(BLUE + "Mr. Mojo Risin 2" + ENDC)
keylist = list(app.config.keys())
- print("runserver.py: ****** Webserver configuration - k,v pairs from app.config ******")
+ print("runserver.py: ****** Webserver configuration - k,v pairs from app.config ******",
+ file=sys.stderr)
keylist.sort()
for k in keylist:
try:
- print(("%s: %s%s%s%s" % (k, BLUE, BOLD, get_setting(k), ENDC)))
+ print(("%s: %s%s%s%s" % (k, BLUE, BOLD, get_setting(k), ENDC)),
+ file=sys.stderr)
except:
- print(("%s: %s%s%s%s" % (k, GREEN, BOLD, app.config[k], ENDC)))
+ print(("%s: %s%s%s%s" % (k, GREEN, BOLD, app.config[k], ENDC)),
+ file=sys.stderr)
# Cached values