Skip to content

Commit

Permalink
Adding comments based upon review
Browse files Browse the repository at this point in the history
  • Loading branch information
wtgee committed Dec 4, 2017
1 parent f4b3a54 commit 7c398be
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pocs/utils/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ def __init__(self, logger):
self.logger = logger

def _process_str(self, fmt, *args, **kwargs):
""" Pre-process the log string
This allows for `format` style specifiers, e.g. `{:02f}` and
`{:40s}`, which otherwise aren't supported by python's default
log formatting.
"""
log_str = fmt
if len(args) > 0 or len(kwargs) > 0:
log_str = fmt.format(*args, **kwargs)
Expand Down Expand Up @@ -84,7 +90,8 @@ def get_root_logger(profile='panoptes', log_config=None):
# Get the logger and set as attribute to class
logger = logging.getLogger(profile)

# Don't want log messages from state machine library
# Don't want log messages from state machine library, it is very noisy and
# we have our own way of logging state transitions
logging.getLogger('transitions.core').setLevel(logging.WARNING)

try:
Expand Down

0 comments on commit 7c398be

Please sign in to comment.