Commit 2984a6d4 authored by Trevor Cappallo's avatar Trevor Cappallo
Browse files

always include debug notify addresses

parent 266b3624
......@@ -21,7 +21,7 @@ import OperationalMail
def __exit_handler(logger, notify):
"""Email given addresses if there are any buffered errors."""
for level in 'ERROR', 'CRITICAL':
for level in 'DEBUG', 'ERROR', 'CRITICAL':
if level not in notify:
notify[level] = []
......@@ -35,6 +35,8 @@ def __exit_handler(logger, notify):
if logger.has_errors():
addresses = notify['ERROR']
if notify['DEBUG']:
addresses.extend(notify['DEBUG'])
if logger.has_critical():
addresses = addresses.extend(notify['CRITICAL'])
if not addresses:
......@@ -42,7 +44,7 @@ def __exit_handler(logger, notify):
else:
addresses = list(set(addresses))
logger.email_log(addresses)
elif 'DEBUG' in notify and notify['DEBUG']:
elif notify['DEBUG']:
addresses = list(set(notify['DEBUG']))
logger.email_log(addresses, level=logging.DEBUG)
else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment