You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2021/09/15 14:48:45 UTC

[brooklyn-server] 05/11: sanitize blueprint contents logged during deployment

This is an automated email from the ASF dual-hosted git repository.

heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-server.git

commit 74a9520e802c89e27f94c98728b225b33219991c
Author: Alex Heneveld <al...@cloudsoftcorp.com>
AuthorDate: Tue Sep 14 23:07:27 2021 +0100

    sanitize blueprint contents logged during deployment
---
 .../java/org/apache/brooklyn/rest/resources/ApplicationResource.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/ApplicationResource.java b/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/ApplicationResource.java
index 3b0d94a..1ebff8f 100644
--- a/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/ApplicationResource.java
+++ b/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/ApplicationResource.java
@@ -23,6 +23,7 @@ import static javax.ws.rs.core.Response.created;
 import static javax.ws.rs.core.Response.status;
 import static javax.ws.rs.core.Response.Status.ACCEPTED;
 import org.apache.brooklyn.api.mgmt.ManagementContext;
+import org.apache.brooklyn.core.config.Sanitizer;
 import static org.apache.brooklyn.rest.util.WebResourceUtils.serviceAbsoluteUriBuilder;
 
 import java.net.URI;
@@ -444,7 +445,7 @@ public class ApplicationResource extends AbstractBrooklynRestResource implements
             }
         }
 
-        log.debug("Creating app from yaml:\n{}", yaml);
+        log.debug("Creating app from yaml:\n{}", Sanitizer.sanitizeMultilineString(yaml));
 
         EntitySpec<? extends Application> spec;
         try {
@@ -498,7 +499,7 @@ public class ApplicationResource extends AbstractBrooklynRestResource implements
             CreationResult<Application,Void> result = EntityManagementUtils.start(app);
             waitForStart(app, Duration.millis(100));
 
-            log.info("Launched from plan: " + planForReference + " -> " + app + " (" + result.task() + ")");
+            log.info("Launched from plan: " + Sanitizer.sanitizeMultilineString(planForReference) + " -> " + app + " (" + result.task() + ")");
 
             URI ref = serviceAbsoluteUriBuilder(ui.getBaseUriBuilder(), ApplicationApi.class, "get").build(app.getApplicationId());
             ResponseBuilder response = created(ref);