Correct log attributes

This commit is contained in:
Jasmine Schladen 2020-10-16 16:30:21 -07:00
parent 2c92fc6eb9
commit 6a1889787d
1 changed files with 7 additions and 7 deletions

View File

@ -101,8 +101,8 @@ def send_notification(event_type, data, targets, notification):
log_data = { log_data = {
"function": function, "function": function,
"message": "Sending expiration notification for to targets {}".format(targets), "message": "Sending expiration notification for to targets {}".format(targets),
"notification_type": "rotation", "notification_type": "expiration",
"targets": targets, "certificate_targets": targets,
} }
status = FAILURE_METRIC_STATUS status = FAILURE_METRIC_STATUS
try: try:
@ -202,8 +202,8 @@ def send_rotation_notification(certificate, notification_plugin=None):
"function": function, "function": function,
"message": "Sending rotation notification for certificate {}".format(certificate.name), "message": "Sending rotation notification for certificate {}".format(certificate.name),
"notification_type": "rotation", "notification_type": "rotation",
"name": certificate.name, "certificate_name": certificate.name,
"owner": certificate.owner, "certificate_owner": certificate.owner,
} }
status = FAILURE_METRIC_STATUS status = FAILURE_METRIC_STATUS
if not notification_plugin: if not notification_plugin:
@ -247,9 +247,9 @@ def send_pending_failure_notification(
log_data = { log_data = {
"function": function, "function": function,
"message": "Sending pending failure notification for pending certificate {}".format(pending_cert.name), "message": "Sending pending failure notification for pending certificate {}".format(pending_cert.name),
"notification_type": "rotation", "notification_type": "failed",
"name": pending_cert.name, "certificate_name": pending_cert.name,
"owner": pending_cert.owner, "certificate_owner": pending_cert.owner,
} }
status = FAILURE_METRIC_STATUS status = FAILURE_METRIC_STATUS