Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Trevor Cappallo
OperationalLogging
Commits
2984a6d4
Commit
2984a6d4
authored
Sep 01, 2015
by
Trevor Cappallo
Browse files
always include debug notify addresses
parent
266b3624
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
lib/OperationalLogger.py
lib/OperationalLogger.py
+4
-2
No files found.
lib/OperationalLogger.py
View file @
2984a6d4
...
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment