Skip to content

Commit

Permalink
CR: replace auditLogger with logger.error
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaliidm committed Jun 8, 2022
1 parent bd36d9a commit 64e7adb
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions x-pack/plugins/alerting/server/rules_client/rules_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1513,12 +1513,14 @@ export class RulesClient {

try {
await this.taskManager.bulkUpdateSchedules(taskIds, scheduleOperation.value);
this.logger.debug(
`Successfully updated schedules for underlying tasks: ${taskIds.join(', ')}`
);
} catch (error) {
this.auditLogger?.log(
ruleAuditEvent({
action: RuleAuditAction.BULK_EDIT,
error,
})
this.logger.error(
`Failure to update schedules for underlying tasks: ${taskIds.join(
', '
)}. TaskManager bulkUpdateSchedules failed with Error: ${error.message}`
);
}
}
Expand Down

0 comments on commit 64e7adb

Please sign in to comment.