diff --git a/monasca_notification/main.py b/monasca_notification/main.py index 0d8b232..7fbf7c1 100644 --- a/monasca_notification/main.py +++ b/monasca_notification/main.py @@ -102,6 +102,14 @@ def main(argv=None): config = yaml.safe_load(open(config_file, 'r')) # Setup logging + try: + if config['logging']['raise_exceptions'] is True: + logging.raiseExceptions = True + else: + logging.raiseExceptions = False + except KeyError: + logging.raiseExceptions = False + pass logging.config.dictConfig(config['logging']) for proc in range(0, config['processors']['notification']['number']): diff --git a/notification.yaml b/notification.yaml index 1767ef7..cadc00e 100644 --- a/notification.yaml +++ b/notification.yaml @@ -89,6 +89,9 @@ zookeeper: 60: /notification/60_seconds logging: # Used in logging.dictConfig + # This sets logging.raiseExcetpions. It is recommended to leave this set to False. + # See https://docs.python.org/2/howto/logging.html#exceptions-raised-during-logging + raise_exceptions: False version: 1 disable_existing_loggers: False formatters: