diff options
Diffstat (limited to 'wqflask/utility')
-rw-r--r-- | wqflask/utility/logger.py | 10 | ||||
-rw-r--r-- | wqflask/utility/tools.py | 1 |
2 files changed, 6 insertions, 5 deletions
diff --git a/wqflask/utility/logger.py b/wqflask/utility/logger.py index a2ae1f1a..ff53977e 100644 --- a/wqflask/utility/logger.py +++ b/wqflask/utility/logger.py @@ -30,10 +30,10 @@ import logging import string from inspect import isfunction from pprint import pformat as pf +from inspect import stack from utility.tools import LOG_LEVEL, LOG_SQL, LOG_FORMAT - class GNLogger: """A logger class with some additional functionality, such as multiple parameter logging, SQL logging, timing, colors, and lazy @@ -89,9 +89,9 @@ class GNLogger: def collect(self,fun,*args): """Collect arguments and use fun to output""" - out = "" + out = "."+stack()[2][3] for a in args: - if len(out)>0: + if len(out)>1: out += ": " if isinstance(a, str): out = out + a @@ -101,9 +101,9 @@ class GNLogger: def collectf(self,fun,*args): """Collect arguments and use fun to output one by one""" - out = "" + out = "."+stack()[2][3] for a in args: - if len(out)>0: + if len(out)>1: out += ": " if isfunction(a): out += a() diff --git a/wqflask/utility/tools.py b/wqflask/utility/tools.py index 21c9c1b7..93b1fa51 100644 --- a/wqflask/utility/tools.py +++ b/wqflask/utility/tools.py @@ -169,6 +169,7 @@ def show_settings(): # Cached values WEBSERVER_MODE = get_setting('WEBSERVER_MODE') GN_SERVER_URL = get_setting('GN_SERVER_URL') +SQL_URI = get_setting('SQL_URI') LOG_LEVEL = get_setting('LOG_LEVEL') LOG_LEVEL_DEBUG = get_setting_int('LOG_LEVEL_DEBUG') LOG_SQL = get_setting_bool('LOG_SQL') |