Skip to content

Commit

Permalink
Adding dev logs.
Browse files Browse the repository at this point in the history
Signed-off-by: AWSHurneyt <[email protected]>
  • Loading branch information
AWSHurneyt committed Feb 9, 2024
1 parent b10eaad commit d4ba0a2
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@

package org.opensearch.alerting.script

import org.apache.logging.log4j.LogManager
import org.opensearch.alerting.model.BucketLevelTriggerRunResult
import org.opensearch.alerting.model.MonitorRunResult
import org.opensearch.commons.alerting.model.Alert
import org.opensearch.commons.alerting.model.BucketLevelTrigger
import org.opensearch.commons.alerting.model.Monitor
import java.time.Instant

private val logger = LogManager.getLogger(BucketLevelTriggerExecutionContext::class.java)

data class BucketLevelTriggerExecutionContext(
override val monitor: Monitor,
val trigger: BucketLevelTrigger,
Expand Down Expand Up @@ -41,6 +44,7 @@ data class BucketLevelTriggerExecutionContext(
* translate the context to a Map of Strings to primitive types, which can be accessed without reflection.
*/
override fun asTemplateArg(): Map<String, Any?> {
logger.info("hurneyt BucketLevelTriggerExecutionContext::results = {}", results)
val tempArg = super.asTemplateArg().toMutableMap()
tempArg["trigger"] = trigger.asTemplateArg()
tempArg["dedupedAlerts"] = dedupedAlerts.map { it.asTemplateArg() }
Expand Down

0 comments on commit d4ba0a2

Please sign in to comment.