summaryrefslogtreecommitdiff
path: root/src/leap/bitmask
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2014-01-31 13:03:08 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2014-01-31 14:25:09 -0300
commit403c681e3d420479747407ae77d5c157c0677dd9 (patch)
tree94915f743be912f19ad1747f0ebddf4e88c13496 /src/leap/bitmask
parent36e49c638cbfba25466644553009526ef87c01b8 (diff)
Improve logs readability
- levelname: after time, fixed width, left aligned - Line number before name and with fixed width - function with ()
Diffstat (limited to 'src/leap/bitmask')
-rw-r--r--src/leap/bitmask/app.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/leap/bitmask/app.py b/src/leap/bitmask/app.py
index 941ba4f8..a702ab3a 100644
--- a/src/leap/bitmask/app.py
+++ b/src/leap/bitmask/app.py
@@ -101,8 +101,9 @@ def add_logger_handlers(debug=False, logfile=None, replace_stdout=True):
logger = logging.getLogger(name='leap')
logger.setLevel(level)
- log_format = ('%(asctime)s - %(name)s:%(funcName)s:L#%(lineno)s '
- '- %(levelname)s - %(message)s')
+ # levelname length == 8, since 'CRITICAL' is the longest
+ log_format = ('%(asctime)s - %(levelname)-8s - '
+ 'L#%(lineno)-4s : %(name)s:%(funcName)s() - %(message)s')
formatter = logging.Formatter(log_format)
# Console handler