diff --git a/orca-web/orca-web.gradle b/orca-web/orca-web.gradle index f7c1444c95..040eb4403c 100644 --- a/orca-web/orca-web.gradle +++ b/orca-web/orca-web.gradle @@ -53,6 +53,7 @@ dependencies { compile spinnaker.dependency('korkExceptions') compile spinnaker.dependency("korkStackdriver") compile spinnaker.dependency("korkWeb") + compile spinnaker.dependency("logstashEncoder") spinnaker.group('test') testCompile project(":orca-test") diff --git a/orca-web/src/main/groovy/com/netflix/spinnaker/orca/controllers/OperationsController.groovy b/orca-web/src/main/groovy/com/netflix/spinnaker/orca/controllers/OperationsController.groovy index 6fee4ec233..b61bb378dc 100644 --- a/orca-web/src/main/groovy/com/netflix/spinnaker/orca/controllers/OperationsController.groovy +++ b/orca-web/src/main/groovy/com/netflix/spinnaker/orca/controllers/OperationsController.groovy @@ -38,6 +38,7 @@ import org.springframework.web.bind.annotation.RequestBody import org.springframework.web.bind.annotation.RequestMapping import org.springframework.web.bind.annotation.RequestMethod import org.springframework.web.bind.annotation.RestController +import static net.logstash.logback.argument.StructuredArguments.value @RestController @Slf4j @@ -82,7 +83,7 @@ class OperationsController { pipeline.trigger = trigger def json = objectMapper.writeValueAsString(pipeline) - log.info('received pipeline {}:{}', pipeline.id, json) + log.info('received pipeline {}:{}', value("pipelineId", pipeline.id), json) if (pipeline.disabled) { throw new InvalidRequestException("Pipeline is disabled and cannot be started.") @@ -94,7 +95,7 @@ class OperationsController { } if (plan) { - log.info('not starting pipeline (plan: true): {}', pipeline.id) + log.info('not starting pipeline (plan: true): {}', value("pipelineId", pipeline.id)) if (pipeline.errors != null) { throw new ValidationException("Pipeline template is invalid", pipeline.errors as List>) }