diff options
author | Adam Spiers <git@adamspiers.org> | 2016-06-29 15:04:07 +0100 |
---|---|---|
committer | Adam Spiers <git@adamspiers.org> | 2018-05-15 13:42:16 +0100 |
commit | c635d6c42af634626ca0b445837f151c7e1259a7 (patch) | |
tree | 375b9b0a34792a4cb93ae5a20aef0bbb21c1a6a6 /git_deps/utils.py | |
parent | 1385b3698a3b230368a3ad8510d2706c0930dc26 (diff) | |
download | git-deps-c635d6c42af634626ca0b445837f151c7e1259a7.tar.gz |
move instantiation of standard logger to utils.py
Diffstat (limited to 'git_deps/utils.py')
-rw-r--r-- | git_deps/utils.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/git_deps/utils.py b/git_deps/utils.py index e2e1720..cd2a0f1 100644 --- a/git_deps/utils.py +++ b/git_deps/utils.py @@ -9,6 +9,13 @@ def abort(msg, exitcode=1): sys.exit(exitcode) +def standard_logger(name, debug): + if not debug: + return logging.getLogger(name) + + return debug_logger(name) + + def debug_logger(name): log_format = '%(asctime)-15s %(levelname)-6s %(message)s' date_format = '%b %d %H:%M:%S' |