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 2015/06/24 10:05:23 UTC

[12/22] incubator-brooklyn git commit: change how freemarker logging is set to remove warning about "logging libraray"

change how freemarker logging is set to remove warning about "logging libraray"


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/1e29ad98
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/1e29ad98
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/1e29ad98

Branch: refs/heads/master
Commit: 1e29ad982453f6a7fe4e5a4d8b5abc14dd17838a
Parents: d2ac273
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Sat Jun 20 14:30:55 2015 -0700
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Wed Jun 24 00:40:33 2015 -0700

----------------------------------------------------------------------
 .../brooklyn/entity/drivers/downloads/DownloadSubstituters.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/1e29ad98/core/src/main/java/brooklyn/entity/drivers/downloads/DownloadSubstituters.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/brooklyn/entity/drivers/downloads/DownloadSubstituters.java b/core/src/main/java/brooklyn/entity/drivers/downloads/DownloadSubstituters.java
index 4e44bc7..7ff520a 100644
--- a/core/src/main/java/brooklyn/entity/drivers/downloads/DownloadSubstituters.java
+++ b/core/src/main/java/brooklyn/entity/drivers/downloads/DownloadSubstituters.java
@@ -55,7 +55,7 @@ public class DownloadSubstituters {
         // since this is the main place it is used, let's do it here
         try {
             LOG.debug("Configuring Freemarker logging for Brooklyn to use SLF4J");
-            freemarker.log.Logger.selectLoggerLibrary(freemarker.log.Logger.LIBRARY_SLF4J);
+            System.setProperty(freemarker.log.Logger.SYSTEM_PROPERTY_NAME_LOGGER_LIBRARY, freemarker.log.Logger.LIBRARY_NAME_SLF4J);
         } catch (Exception e) {
             LOG.warn("Error setting Freemarker logging: "+e, e);
         }
@@ -124,7 +124,7 @@ public class DownloadSubstituters {
 
     public static String substitute(String basevalue, Map<String,?> substitutions) {
         try {
-            Configuration cfg = new Configuration();
+            Configuration cfg = new Configuration(Configuration.DEFAULT_INCOMPATIBLE_IMPROVEMENTS);
             StringTemplateLoader templateLoader = new StringTemplateLoader();
             templateLoader.putTemplate("config", basevalue);
             cfg.setTemplateLoader(templateLoader);