add some logging to track notifications temporarily

This commit is contained in:
Rob Fletcher 2016-11-07 11:58:04 -08:00
Родитель 4848fc5f9c
Коммит 2fce5cd68f
2 изменённых файлов: 9 добавлений и 0 удалений

Просмотреть файл

@ -30,6 +30,7 @@ class StageStatusPropagationListener implements StageListener {
return return
} }
log.debug("***** $stage.execution.id Stage ${stage.type} starting")
log.info("Marking Stage as RUNNING (stageId: ${stage.id})") log.info("Marking Stage as RUNNING (stageId: ${stage.id})")
stage.startTime = stage.startTime ?: System.currentTimeMillis() stage.startTime = stage.startTime ?: System.currentTimeMillis()
stage.status = ExecutionStatus.RUNNING stage.status = ExecutionStatus.RUNNING
@ -71,10 +72,12 @@ class StageStatusPropagationListener implements StageListener {
stage.status = executionStatus stage.status = executionStatus
if (executionStatus.complete) { if (executionStatus.complete) {
log.debug("***** $stage.execution.id Stage $stage.type $executionStatus")
stage.endTime = stage.endTime ?: System.currentTimeMillis() stage.endTime = stage.endTime ?: System.currentTimeMillis()
} }
} }
} else { } else {
log.debug("***** $stage.execution.id Stage $stage.type terminal due to missing status")
stage.endTime = System.currentTimeMillis() stage.endTime = System.currentTimeMillis()
stage.status = ExecutionStatus.TERMINAL stage.status = ExecutionStatus.TERMINAL
} }

Просмотреть файл

@ -38,6 +38,7 @@ class EchoNotifyingStageListener implements StageListener {
<T extends Execution<T>> void beforeStage(Persister persister, <T extends Execution<T>> void beforeStage(Persister persister,
Stage<T> stage) { Stage<T> stage) {
if (stage.status == NOT_STARTED) { if (stage.status == NOT_STARTED) {
log.debug("***** $stage.execution.id Echo stage $stage.name starting v2")
recordEvent("stage", "starting", stage) recordEvent("stage", "starting", stage)
} }
} }
@ -58,11 +59,14 @@ class EchoNotifyingStageListener implements StageListener {
if (stage.execution instanceof Pipeline && stage.execution.executionEngine == "v1") { if (stage.execution instanceof Pipeline && stage.execution.executionEngine == "v1") {
if (wasSuccessful) { if (wasSuccessful) {
if (task.name.contains('stageEnd')) { if (task.name.contains('stageEnd')) {
log.debug("***** $stage.execution.id Echo stage $stage.name complete")
recordEvent('stage', 'complete', stage, task) recordEvent('stage', 'complete', stage, task)
} else if (task.name.contains('stageStart')) { } else if (task.name.contains('stageStart')) {
log.debug("***** $stage.execution.id Echo stage $stage.name starting")
recordEvent('stage', 'starting', stage, task) recordEvent('stage', 'starting', stage, task)
} }
} else { } else {
log.debug("***** $stage.execution.id Echo stage $stage.name failed")
recordEvent('stage', 'failed', stage, task) recordEvent('stage', 'failed', stage, task)
} }
} }
@ -73,8 +77,10 @@ class EchoNotifyingStageListener implements StageListener {
Stage<T> stage) { Stage<T> stage) {
if (stage.execution instanceof Pipeline) { if (stage.execution instanceof Pipeline) {
if (stage.status.successful) { if (stage.status.successful) {
log.debug("***** $stage.execution.id Echo stage $stage.name complete v2")
recordEvent('stage', 'complete', stage) recordEvent('stage', 'complete', stage)
} else { } else {
log.debug("***** $stage.execution.id Echo stage $stage.name failed v2")
recordEvent('stage', 'failed', stage) recordEvent('stage', 'failed', stage)
} }
} }