commit | 746e1885470abf406ad60c97781c20189dfee714 | [log] [tgz] |
---|---|---|
author | Christian Aistleitner <christian@quelltextlich.at> | Tue May 12 12:00:47 2020 +0200 |
committer | Christian Aistleitner <christian@quelltextlich.at> | Sat May 16 15:06:41 2020 +0200 |
tree | 2b7d9f6f0d110cdcc3547328bbe8b3bbe0bdbcee | |
parent | b56229305e282bb4e9fafaa41fe5334824c6e7a6 [diff] |
Allow to log rendered Soy templates This is useful for debugging where which escaping takes place. Change-Id: I2e795bc4188a8e04aacd4e39ddc13915c454befa
diff --git a/src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/AddSoyComment.java b/src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/AddSoyComment.java index 3ee4ca8..bc8b9dc 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/AddSoyComment.java +++ b/src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/AddSoyComment.java
@@ -76,7 +76,9 @@ .newRenderer("etc.its.templates." + template) .setContentKind(kind) .setData(properties); - return renderer.render(); + String rendered = renderer.render(); + logger.atFinest().log("Rendered template %s to:\n%s", templatePath, rendered); + return rendered; } private String soyTextTemplate(Builder builder, String template, Map<String, String> properties) {