diff options
Diffstat (limited to 'cgitize/utils.py')
-rw-r--r-- | cgitize/utils.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cgitize/utils.py b/cgitize/utils.py index 152684f..2f91939 100644 --- a/cgitize/utils.py +++ b/cgitize/utils.py @@ -12,9 +12,10 @@ import sys @contextmanager -def setup_logging(): +def setup_logging(verbose=False): + level = logging.DEBUG if verbose else logging.INFO logging.basicConfig( - level=logging.DEBUG, + level=level, datefmt='%Y-%m-%d %H:%M:%S', format='%(asctime)s | %(levelname)s | %(message)s', # Log to stdout, because that's where subprocess's output goes (so that |