From 96837ff7749f9df7a9d0314649d159c7b6cdbe3a Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 29 Jun 2019 19:58:44 -0600 Subject: [PATCH] Going to use the logging module for logging --- scripts/wk/std.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/wk/std.py b/scripts/wk/std.py index e71eaa27..cd86d714 100644 --- a/scripts/wk/std.py +++ b/scripts/wk/std.py @@ -1,6 +1,7 @@ '''WizardKit: Standard Functions''' # vim: sts=2 sw=2 ts=2 +import logging import os import sys @@ -22,6 +23,7 @@ COLORS = { 'PURPLE': '\033[35m', 'CYAN': '\033[36m', } +LOG = logging.getLogger(__name__) # Functions @@ -38,9 +40,11 @@ def input_text(prompt='Enter text'): tcflush(sys.stdin, TCIOFLUSH) try: response = input(prompt) + LOG.debug('%s.input_text response: %s', __name__, response) except EOFError: # Ignore and try again - print('') + LOG.warning('Exception occured', exc_info=True) + print('', flush=True) return response