"""Showcase logging.Formatter.format() bug. The expected behavior is to see the traceback twice, once in all caps and once normally. The actual behavior (at least on Python 3.6.0rc2) is both are capitalized. You can swap the order of the addHandler() calls so that both are non-capitalized. """ import logging class YellingTracebackFormatter(logging.Formatter): def formatException(self, record): return super().formatException(record).upper() yelling_traceback_handler = logging.StreamHandler() yelling_traceback_handler.setFormatter(YellingTracebackFormatter()) default_handler = logging.StreamHandler() logging.getLogger('').addHandler(yelling_traceback_handler) logging.getLogger('').addHandler(default_handler) print("One traceback should be in all-caps, the other should be normal:") try: raise Exception() except Exception: logging.exception('Error occurred')