struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject [08/15] struts git commit: WW-4504 - Mark current logging layer as @deprecated and use Log4j2 as default one
Date Tue, 26 May 2015 17:22:04 GMT
http://git-wip-us.apache.org/repos/asf/struts/blob/8e877115/plugins/convention/src/main/java/org/apache/struts2/convention/PackageBasedActionConfigBuilder.java
----------------------------------------------------------------------
diff --git a/plugins/convention/src/main/java/org/apache/struts2/convention/PackageBasedActionConfigBuilder.java b/plugins/convention/src/main/java/org/apache/struts2/convention/PackageBasedActionConfigBuilder.java
index ee6516f..702e1d3 100644
--- a/plugins/convention/src/main/java/org/apache/struts2/convention/PackageBasedActionConfigBuilder.java
+++ b/plugins/convention/src/main/java/org/apache/struts2/convention/PackageBasedActionConfigBuilder.java
@@ -143,7 +143,7 @@ public class PackageBasedActionConfigBuilder implements ActionConfigBuilder {
         this.redirectToSlash = Boolean.parseBoolean(redirectToSlash);
 
         if (LOG.isTraceEnabled()) {
-            LOG.trace("Setting action default parent package to [#0]", defaultParentPackage);
+            LOG.trace("Setting action default parent package to [{}]", defaultParentPackage);
         }
 
         this.defaultParentPackage = defaultParentPackage;
@@ -478,8 +478,9 @@ public class PackageBasedActionConfigBuilder implements ActionConfigBuilder {
         if (includeJars == null) {
             urlSet = urlSet.exclude(".*?\\.jar(!/|/)?");
         } else {
-            LOG.debug("jar urls regexes were specified: #0", Arrays.asList(includeJars));
-
+            if(LOG.isDebugEnabled()) {
+                LOG.debug("jar urls regexes were specified: {}", Arrays.asList(includeJars));
+            }
             List<URL> rawIncludedUrls = urlSet.getUrls();
             Set<URL> includeUrls = new HashSet<URL>();
             boolean[] patternUsed = new boolean[includeJars.length];
@@ -496,7 +497,7 @@ public class PackageBasedActionConfigBuilder implements ActionConfigBuilder {
                         }
                     }
                 } else {
-                    LOG.debug("It is not a jar [#0]", url);
+                    LOG.debug("It is not a jar [{}]", url);
                     includeUrls.add(url);
                 }
             }
@@ -504,7 +505,7 @@ public class PackageBasedActionConfigBuilder implements ActionConfigBuilder {
             if (LOG.isWarnEnabled()) {
                 for (int i = 0; i < patternUsed.length; i++) {
                     if (!patternUsed[i]) {
-                        LOG.warn("The includeJars pattern [#0] did not match any jars in the classpath", includeJars[i]);
+                        LOG.warn("The includeJars pattern [{}] did not match any jars in the classpath", includeJars[i]);
                     }
                 }
             }
@@ -637,8 +638,7 @@ public class PackageBasedActionConfigBuilder implements ActionConfigBuilder {
                 try {
                     return inPackage && (nameMatches || (checkImplementsAction && com.opensymphony.xwork2.Action.class.isAssignableFrom(classInfo.get())));
                 } catch (ClassNotFoundException ex) {
-                    if (LOG.isErrorEnabled())
-                        LOG.error("Unable to load class [#0]", ex, classInfo.getName());
+                    LOG.error("Unable to load class [{}]", ex, classInfo.getName());
                     return false;
                 }
             }
@@ -655,8 +655,7 @@ public class PackageBasedActionConfigBuilder implements ActionConfigBuilder {
 
             // Skip classes that can't be instantiated
             if (cannotInstantiate(actionClass)) {
-                if (LOG.isTraceEnabled())
-                    LOG.trace("Class [#0] did not pass the instantiation test and will be ignored", actionClass.getName());
+                LOG.trace("Class [{}] did not pass the instantiation test and will be ignored", actionClass.getName());
                 continue;
             }
 
@@ -665,8 +664,7 @@ public class PackageBasedActionConfigBuilder implements ActionConfigBuilder {
                 try {
                     objectFactory.getClassInstance(actionClass.getName());
                 } catch (ClassNotFoundException e) {
-                    if (LOG.isErrorEnabled())
-                        LOG.error("Object Factory was unable to load class [#0]", e, actionClass.getName());
+                    LOG.error("Object Factory was unable to load class [{}]", e, actionClass.getName());
                     throw new StrutsException("Object Factory was unable to load class " + actionClass.getName(), e);
                 }
             }
@@ -674,7 +672,7 @@ public class PackageBasedActionConfigBuilder implements ActionConfigBuilder {
             // Determine the action package
             String actionPackage = actionClass.getPackage().getName();
             if (LOG.isDebugEnabled()) {
-                LOG.debug("Processing class [#0] in package [#1]", actionClass.getName(), actionPackage);
+                LOG.debug("Processing class [{}] in package [{}]", actionClass.getName(), actionPackage);
             }
 
             // Determine the default namespace and action name
@@ -789,9 +787,7 @@ public class PackageBasedActionConfigBuilder implements ActionConfigBuilder {
         //single namespace
         Namespace namespaceAnnotation = AnnotationUtils.findAnnotation(actionClass, Namespace.class);
         if (namespaceAnnotation != null) {
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("Using non-default action namespace from Namespace annotation of [#0]", namespaceAnnotation.value());
-            }
+            LOG.trace("Using non-default action namespace from Namespace annotation of [{}]", namespaceAnnotation.value());
 
             namespaces.add(namespaceAnnotation.value());
         }
@@ -804,7 +800,7 @@ public class PackageBasedActionConfigBuilder implements ActionConfigBuilder {
                 for (Namespace namespace : namespacesAnnotation.value())
                     sb.append(namespace.value()).append(",");
                 sb.deleteCharAt(sb.length() - 1);
-                LOG.trace("Using non-default action namespaces from Namespaces annotation of [#0]", sb.toString());
+                LOG.trace("Using non-default action namespaces from Namespaces annotation of [{}]", sb.toString());
             }
 
             for (Namespace namespace : namespacesAnnotation.value())
@@ -859,9 +855,7 @@ public class PackageBasedActionConfigBuilder implements ActionConfigBuilder {
      */
     protected String determineActionName(Class<?> actionClass) {
         String actionName = actionNameBuilder.build(actionClass.getSimpleName());
-        if (LOG.isTraceEnabled()) {
-            LOG.trace("Got actionName for class [#0] of [#1]", actionClass.toString(), actionName);
-        }
+        LOG.trace("Got actionName for class [{}] of [{}]", actionClass.toString(), actionName);
 
         return actionName;
     }
@@ -939,7 +933,7 @@ public class PackageBasedActionConfigBuilder implements ActionConfigBuilder {
         actionConfig.methodName(actionMethod);
 
         if (LOG.isDebugEnabled()) {
-            LOG.debug("Creating action config for class [#0], name [#1] and package name [#2] in namespace [#3]",
+            LOG.debug("Creating action config for class [{}], name [{}] and package name [{}] in namespace [{}]",
                     actionClass.toString(), actionName, pkgCfg.getName(), pkgCfg.getNamespace());
         }
 
@@ -972,8 +966,9 @@ public class PackageBasedActionConfigBuilder implements ActionConfigBuilder {
         if (existingPkg != null) {
             // there is a package already with that name, check action
             ActionConfig existingActionConfig = existingPkg.getActionConfigs().get(actionName);
-            if (existingActionConfig != null && LOG.isWarnEnabled())
-                LOG.warn("Duplicated action definition in package [#0] with name [#1].", pkgCfg.getName(), actionName);
+            if (existingActionConfig != null && LOG.isWarnEnabled()) {
+                LOG.warn("Duplicated action definition in package [{}] with name [{}].", pkgCfg.getName(), actionName);
+            }
         }
 
         //watch class file
@@ -988,8 +983,7 @@ public class PackageBasedActionConfigBuilder implements ActionConfigBuilder {
         List<ExceptionMappingConfig> exceptionMappings = new ArrayList<ExceptionMappingConfig>();
 
         for (ExceptionMapping exceptionMapping : exceptions) {
-            if (LOG.isTraceEnabled())
-                LOG.trace("Mapping exception [#0] to result [#1] for action [#2]", exceptionMapping.exception(),
+            LOG.trace("Mapping exception [{}] to result [{}] for action [{}]", exceptionMapping.exception(),
                         exceptionMapping.result(), actionName);
             ExceptionMappingConfig.Builder builder = new ExceptionMappingConfig.Builder(null, exceptionMapping
                     .exception(), exceptionMapping.result());
@@ -1005,9 +999,7 @@ public class PackageBasedActionConfigBuilder implements ActionConfigBuilder {
                                                    String actionNamespace, final String actionPackage, final Class<?> actionClass,
                                                    Action action) {
         if (action != null && !action.value().equals(Action.DEFAULT_VALUE)) {
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("Using non-default action namespace from the Action annotation of [#0]", action.value());
-            }
+            LOG.trace("Using non-default action namespace from the Action annotation of [{}]", action.value());
             String actionName = action.value();
             actionNamespace = StringUtils.contains(actionName, "/") ? StringUtils.substringBeforeLast(actionName, "/") : StringUtils.EMPTY;
         }
@@ -1016,10 +1008,7 @@ public class PackageBasedActionConfigBuilder implements ActionConfigBuilder {
         ParentPackage parent = AnnotationUtils.findAnnotation(actionClass, ParentPackage.class);
         String parentName = null;
         if (parent != null) {
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("Using non-default parent package from annotation of [#0]", parent.value());
-            }
-
+            LOG.trace("Using non-default parent package from annotation of [{}]", parent.value());
             parentName = parent.value();
         }
 
@@ -1051,14 +1040,11 @@ public class PackageBasedActionConfigBuilder implements ActionConfigBuilder {
             if (defaultInterceptorRef != null) {
                 pkgConfig.defaultInterceptorRef(defaultInterceptorRef.value());
 
-                if (LOG.isTraceEnabled())
-                    LOG.trace("Setting [#0] as the default interceptor ref for [#1]", defaultInterceptorRef.value(), pkgConfig.getName());
+                LOG.trace("Setting [{}] as the default interceptor ref for [{}]", defaultInterceptorRef.value(), pkgConfig.getName());
             }
         }
 
-        if (LOG.isTraceEnabled()) {
-            LOG.trace("Created package config named [#0] with a namespace [#1]", name, actionNamespace);
-        }
+        LOG.trace("Created package config named [{}] with a namespace [{}]", name, actionNamespace);
 
         return pkgConfig;
     }
@@ -1110,18 +1096,16 @@ public class PackageBasedActionConfigBuilder implements ActionConfigBuilder {
                             parent.addActionConfig(parentAction, indexActionConfig);
                         }
                     } else if (LOG.isTraceEnabled()) {
-                        LOG.trace("The parent namespace [#0] already contains " +
-                                "an action [#1]", parentNamespace, parentAction);
+                        LOG.trace("The parent namespace [{}] already contains " +
+                                "an action [{}]", parentNamespace, parentAction);
                     }
                 }
             }
 
             // Step #3
             if (pkgConfig.build().getAllActionConfigs().get("") == null) {
-                if (LOG.isTraceEnabled()) {
-                    LOG.trace("Creating index ActionConfig with an action name of [] for the action " +
-                            "class [#0]", indexActionConfig.getClassName());
-                }
+                LOG.trace("Creating index ActionConfig with an action name of [] for the action " +
+                            "class [{}]", indexActionConfig.getClassName());
 
                 pkgConfig.addActionConfig("", indexActionConfig);
             }
@@ -1137,7 +1121,7 @@ public class PackageBasedActionConfigBuilder implements ActionConfigBuilder {
             for (String url : loadedFileUrls) {
                 if (fileManager.fileNeedsReloading(url)) {
                     if (LOG.isDebugEnabled())
-                        LOG.debug("File [#0] changed, configuration will be reloaded", url);
+                        LOG.debug("File [{}] changed, configuration will be reloaded", url);
                     return true;
                 }
             }

http://git-wip-us.apache.org/repos/asf/struts/blob/8e877115/plugins/convention/src/main/java/org/apache/struts2/convention/SEOActionNameBuilder.java
----------------------------------------------------------------------
diff --git a/plugins/convention/src/main/java/org/apache/struts2/convention/SEOActionNameBuilder.java b/plugins/convention/src/main/java/org/apache/struts2/convention/SEOActionNameBuilder.java
index 84420d7..f2920c0 100644
--- a/plugins/convention/src/main/java/org/apache/struts2/convention/SEOActionNameBuilder.java
+++ b/plugins/convention/src/main/java/org/apache/struts2/convention/SEOActionNameBuilder.java
@@ -89,9 +89,7 @@ public class SEOActionNameBuilder implements ActionNameBuilder {
             actionName = actionName.toLowerCase();
         }
 
-        if (LOG.isTraceEnabled()) {
-            LOG.trace("Changed action name from [#0] to [#1]", className, actionName);
-        }
+        LOG.trace("Changed action name from [{}] to [{}]", className, actionName);
 
         return actionName;
     }

http://git-wip-us.apache.org/repos/asf/struts/blob/8e877115/plugins/embeddedjsp/src/main/java/org/apache/struts2/JSPLoader.java
----------------------------------------------------------------------
diff --git a/plugins/embeddedjsp/src/main/java/org/apache/struts2/JSPLoader.java b/plugins/embeddedjsp/src/main/java/org/apache/struts2/JSPLoader.java
index 127d173..280ae91 100644
--- a/plugins/embeddedjsp/src/main/java/org/apache/struts2/JSPLoader.java
+++ b/plugins/embeddedjsp/src/main/java/org/apache/struts2/JSPLoader.java
@@ -81,9 +81,7 @@ public class JSPLoader {
     public Servlet load(String location) throws Exception {
         location = StringUtils.substringBeforeLast(location, "?");
 
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Compiling JSP [#0]", location);
-        }
+        LOG.debug("Compiling JSP [{}]", location);
 
         //use Jasper to compile the JSP into java code
         JspC jspC = compileJSP(location);
@@ -137,14 +135,10 @@ public class JSPLoader {
      * Compiles the given source code into java bytecode
      */
     private void compileJava(String className, final String source, Set<String> extraClassPath) throws IOException {
-        if (LOG.isTraceEnabled())
-            LOG.trace("Compiling [#0], source: [#1]", className, source);
-
-        JavaCompiler compiler =
-                ToolProvider.getSystemJavaCompiler();
+        LOG.trace("Compiling [{}], source: [{}]", className, source);
 
-        DiagnosticCollector<JavaFileObject> diagnostics =
-                new DiagnosticCollector<JavaFileObject>();
+        JavaCompiler compiler =ToolProvider.getSystemJavaCompiler();
+        DiagnosticCollector<JavaFileObject> diagnostics = new DiagnosticCollector<JavaFileObject>();
 
         //the generated bytecode is fed to the class loader
         JavaFileManager jfm = new

http://git-wip-us.apache.org/repos/asf/struts/blob/8e877115/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/ValueStackDataSource.java
----------------------------------------------------------------------
diff --git a/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/ValueStackDataSource.java b/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/ValueStackDataSource.java
index 7fc8e16..81641a5 100644
--- a/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/ValueStackDataSource.java
+++ b/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/ValueStackDataSource.java
@@ -100,10 +100,7 @@ public class ValueStackDataSource implements JRRewindableDataSource {
         }
 
         Object value = valueStack.findValue(expression);
-
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Field [#0] = [#1]", field.getName(), value);
-        }
+        LOG.debug("Field [{}] = [{}]", field.getName(), value);
 
         if (!wrapField && MakeIterator.isIterable(value) && !field.getValueClass().isInstance(value)) {
             return value;
@@ -132,9 +129,7 @@ public class ValueStackDataSource implements JRRewindableDataSource {
                 iterator = MakeIterator.convert(array);
             }
         } else {
-            if (LOG.isWarnEnabled()) {
-                LOG.warn("Data source value for data source [" + dataSource + "] was null");
-            }
+            LOG.warn("Data source value for data source [{}] was null", dataSource);
         }
     }
 
@@ -156,14 +151,12 @@ public class ValueStackDataSource implements JRRewindableDataSource {
         if ((iterator != null) && (iterator.hasNext())) {
             valueStack.push(iterator.next());
             if (LOG.isDebugEnabled()) {
-                LOG.debug("Pushed next value: " + valueStack.findValue("."));
+                LOG.debug("Pushed next value: {}", valueStack.findValue("."));
             }
 
             return true;
         } else {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("No more values");
-            }
+            LOG.debug("No more values");
 
             return false;
         }

http://git-wip-us.apache.org/repos/asf/struts/blob/8e877115/plugins/java8-support/src/main/java/org/apache/struts2/convention/Java8ClassFinder.java
----------------------------------------------------------------------
diff --git a/plugins/java8-support/src/main/java/org/apache/struts2/convention/Java8ClassFinder.java b/plugins/java8-support/src/main/java/org/apache/struts2/convention/Java8ClassFinder.java
index 6bd3035..76f9caa 100644
--- a/plugins/java8-support/src/main/java/org/apache/struts2/convention/Java8ClassFinder.java
+++ b/plugins/java8-support/src/main/java/org/apache/struts2/convention/Java8ClassFinder.java
@@ -93,8 +93,7 @@ public class Java8ClassFinder implements ClassFinder {
                     }
                 }
             } catch (Exception e) {
-                if (LOG.isErrorEnabled())
-                    LOG.error("Unable to read URL [#0]", e, location.toExternalForm());
+                LOG.error("Unable to read URL [{}]", location.toExternalForm(), e);
             }
         }
 
@@ -103,8 +102,7 @@ public class Java8ClassFinder implements ClassFinder {
                 if (classNameFilter.test(className))
                     readClassDef(className);
             } catch (Throwable e) {
-                if (LOG.isErrorEnabled())
-                    LOG.error("Unable to read class [#0]", e, className);
+                LOG.error("Unable to read class [{}]", className, e);
             }
         }
     }
@@ -197,8 +195,7 @@ public class Java8ClassFinder implements ClassFinder {
                         classes.add(clazz);
                     }
                 } catch (Throwable e) {
-                    if (LOG.isErrorEnabled())
-                        LOG.error("Error loading class [#0]", e, classInfo.getName());
+                    LOG.error("Error loading class [{}]", classInfo.getName(), e);
                     classesNotLoaded.add(classInfo.getName());
                 }
             }
@@ -228,8 +225,7 @@ public class Java8ClassFinder implements ClassFinder {
                         }
                     }
                 } catch (Throwable e) {
-                    if (LOG.isErrorEnabled())
-                        LOG.error("Error loading class [#0]", e, classInfo.getName());
+                    LOG.error("Error loading class [{}]", classInfo.getName(), e);
                     classesNotLoaded.add(classInfo.getName());
                 }
             }
@@ -259,8 +255,7 @@ public class Java8ClassFinder implements ClassFinder {
                         }
                     }
                 } catch (Throwable e) {
-                    if (LOG.isErrorEnabled())
-                        LOG.error("Error loading class [#0]", e, classInfo.getName());
+                    LOG.error("Error loading class [{}]", classInfo.getName(), e);
                     classesNotLoaded.add(classInfo.getName());
                 }
             }
@@ -290,8 +285,7 @@ public class Java8ClassFinder implements ClassFinder {
                         }
                     }
                 } catch (Throwable e) {
-                    if (LOG.isErrorEnabled())
-                        LOG.error("Error loading class [#0]", e, classInfo.getName());
+                    LOG.error("Error loading class [{}]", classInfo.getName(), e);
                     classesNotLoaded.add(classInfo.getName());
                 }
             }
@@ -310,8 +304,7 @@ public class Java8ClassFinder implements ClassFinder {
                     classes.add(classInfo.get());
                 }
             } catch (Throwable e) {
-                if (LOG.isErrorEnabled())
-                    LOG.error("Error loading class [#0]", e, classInfo.getName());
+                LOG.error("Error loading class [{}]", classInfo.getName(), e);
                 classesNotLoaded.add(classInfo.getName());
             }
         }
@@ -327,8 +320,7 @@ public class Java8ClassFinder implements ClassFinder {
                     classes.add(classInfo.get());
                 }
             } catch (Throwable e) {
-                if (LOG.isErrorEnabled())
-                    LOG.error("Error loading class [#0]", e, classInfo.getName());
+                LOG.error("Error loading class [{}]", classInfo.getName(), e);
                 classesNotLoaded.add(classInfo.getName());
             }
         }
@@ -342,8 +334,7 @@ public class Java8ClassFinder implements ClassFinder {
             try {
                 classes.add(classInfo.get());
             } catch (Throwable e) {
-                if (LOG.isErrorEnabled())
-                    LOG.error("Error loading class [#0]", e, classInfo.getName());
+                LOG.error("Error loading class [{}]", classInfo.getName(), e);
                 classesNotLoaded.add(classInfo.getName());
             }
         }
@@ -360,8 +351,7 @@ public class Java8ClassFinder implements ClassFinder {
                     urls.add(url);
                 }
             } catch (IOException ioe) {
-                if (LOG.isErrorEnabled())
-                    LOG.error("Could not read driectory [#0]", ioe, dirName);
+                LOG.error("Could not read directory [{}]", dirName, ioe);
             }
         }
 
@@ -405,9 +395,9 @@ public class Java8ClassFinder implements ClassFinder {
             } finally {
                 in.close();
             }
-        } else if (LOG.isDebugEnabled())
-            LOG.debug("Unable to read [#0]", location.toExternalForm());
-        
+        } else {
+            LOG.debug("Unable to read [{}]", location.toExternalForm());
+        }
         return Collections.emptyList();
     }
 

http://git-wip-us.apache.org/repos/asf/struts/blob/8e877115/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/DefaultTagHandlerFactory.java
----------------------------------------------------------------------
diff --git a/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/DefaultTagHandlerFactory.java b/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/DefaultTagHandlerFactory.java
index b31b9be..bc73d8f 100644
--- a/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/DefaultTagHandlerFactory.java
+++ b/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/DefaultTagHandlerFactory.java
@@ -41,8 +41,7 @@ public class DefaultTagHandlerFactory implements TagHandlerFactory {
             th.setNext(next);
             return th;
         } catch (Exception e) {
-            if (LOG.isErrorEnabled())
-                LOG.error("Failed to instantiate tag handler class [#0]", e, tagHandlerClass.getName());
+            LOG.error("Failed to instantiate tag handler class [{}]", tagHandlerClass.getName(), e);
         }
         
         return null;

http://git-wip-us.apache.org/repos/asf/struts/blob/8e877115/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/DefaultTheme.java
----------------------------------------------------------------------
diff --git a/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/DefaultTheme.java b/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/DefaultTheme.java
index 1e3076a..2cba9bc 100644
--- a/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/DefaultTheme.java
+++ b/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/DefaultTheme.java
@@ -116,9 +116,7 @@ public class DefaultTheme implements Theme {
 
         TagGenerator gen = (TagGenerator) handlers.get(0);
         try {
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("Rendering tag [#0]", tagName);
-            }
+            LOG.trace("Rendering tag [{}]", tagName);
             gen.generate();
         } catch (IOException ex) {
             throw new StrutsException("Unable to write tag: " + tagName, ex);

http://git-wip-us.apache.org/repos/asf/struts/blob/8e877115/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/JavaTemplateEngine.java
----------------------------------------------------------------------
diff --git a/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/JavaTemplateEngine.java b/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/JavaTemplateEngine.java
index 26a7ea3..4c3f29e 100644
--- a/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/JavaTemplateEngine.java
+++ b/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/JavaTemplateEngine.java
@@ -71,9 +71,7 @@ public class JavaTemplateEngine extends BaseTemplateEngine {
         Theme theme = themes.get(t.getTheme());
         if (theme == null) {
             // Theme not supported, so do what struts would have done if we were not here.
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Theme not found [#0] trying default template engine using template type [#1]", t.getTheme(), defaultTemplateType);
-            }
+            LOG.debug("Theme not found [{}] trying default template engine using template type [{}]", t.getTheme(), defaultTemplateType);
             final TemplateEngine engine = templateEngineManager.getTemplateEngine(templateContext.getTemplate(), defaultTemplateType);
 
             if (engine == null) {
@@ -120,24 +118,16 @@ public class JavaTemplateEngine extends BaseTemplateEngine {
         while (customThemes.hasMoreTokens()) {
             String themeClass = customThemes.nextToken().trim();
             try {
-                if (LOG.isInfoEnabled()) {
-                    LOG.info("Registering custom theme [#0] to javatemplates engine", themeClass);
-                }
+                LOG.info("Registering custom theme [{}] to javatemplates engine", themeClass);
                 ObjectFactory factory = ActionContext.getContext().getContainer().getInstance(ObjectFactory.class);
                 Theme theme = (Theme) factory.buildBean(themeClass, new HashMap<String, Object>());
                 themes.add(theme);
             } catch (ClassCastException cce) {
-                if (LOG.isErrorEnabled()) {
-                    LOG.error("Invalid java them class [#0]. Class does not implement 'org.apache.struts2.views.java.Theme' interface", cce, themeClass);
-                }
+                LOG.error("Invalid java them class [{}]. Class does not implement 'org.apache.struts2.views.java.Theme' interface", themeClass, cce);
             } catch (ClassNotFoundException cnf) {
-                if (LOG.isErrorEnabled()) {
-                    LOG.error("Invalid java theme class [#0]. Class not found!", cnf, themeClass);
-                }
+                LOG.error("Invalid java theme class [{}]. Class not found!", themeClass, cnf);
             } catch (Exception e) {
-                if (LOG.isErrorEnabled()) {
-                    LOG.error("Could not find messages file [#0].properties. Skipping!", e, themeClass);
-                }
+                LOG.error("Could not find messages file [{}].properties. Skipping!", themeClass, e);
             }
         }
     }
@@ -152,8 +142,8 @@ public class JavaTemplateEngine extends BaseTemplateEngine {
         // Make sure we don't set ourself as default for race condition
         if (defaultTemplateTheme != null && !defaultTemplateTheme.equalsIgnoreCase(getSuffix())) {
             this.defaultTemplateType = defaultTemplateTheme.toLowerCase();
-        } else if(LOG.isErrorEnabled()) {
-            LOG.error("Invalid struts.javatemplates.defaultTemplateType value. Cannot be [#0]!", getSuffix());
+        } else {
+            LOG.error("Invalid struts.javatemplates.defaultTemplateType value. Cannot be [{}]!", getSuffix());
         }
     }
 

http://git-wip-us.apache.org/repos/asf/struts/blob/8e877115/plugins/json/src/main/java/org/apache/struts2/json/JSONWriter.java
----------------------------------------------------------------------
diff --git a/plugins/json/src/main/java/org/apache/struts2/json/JSONWriter.java b/plugins/json/src/main/java/org/apache/struts2/json/JSONWriter.java
index 39529d2..41262d2 100644
--- a/plugins/json/src/main/java/org/apache/struts2/json/JSONWriter.java
+++ b/plugins/json/src/main/java/org/apache/struts2/json/JSONWriter.java
@@ -420,7 +420,7 @@ public class JSONWriter {
 
             Object key = entry.getKey();
             if (key == null) {
-                LOG.error("Cannot build expression for null key in #0", exprStack);
+                LOG.error("Cannot build expression for null key in {}", exprStack);
                 continue;
             }
 
@@ -438,7 +438,7 @@ public class JSONWriter {
             hasData = true;
             if (!warnedNonString && !(key instanceof String)) {
                 if (LOG.isWarnEnabled()) {
-                    LOG.warn("JavaScript doesn't support non-String keys, using toString() on #0", key.getClass().getName());
+                    LOG.warn("JavaScript doesn't support non-String keys, using toString() on {}", key.getClass().getName());
                 }
                 warnedNonString = true;
             }

http://git-wip-us.apache.org/repos/asf/struts/blob/8e877115/plugins/osgi/src/main/java/org/apache/struts2/osgi/DefaultBundleAccessor.java
----------------------------------------------------------------------
diff --git a/plugins/osgi/src/main/java/org/apache/struts2/osgi/DefaultBundleAccessor.java b/plugins/osgi/src/main/java/org/apache/struts2/osgi/DefaultBundleAccessor.java
index 199f183..c5103be 100644
--- a/plugins/osgi/src/main/java/org/apache/struts2/osgi/DefaultBundleAccessor.java
+++ b/plugins/osgi/src/main/java/org/apache/struts2/osgi/DefaultBundleAccessor.java
@@ -110,8 +110,7 @@ public class DefaultBundleAccessor implements BundleAccessor {
         Bundle bundle = getCurrentBundle();
         if (bundle != null) {
             Class cls = bundle.loadClass(className);
-            if (LOG.isTraceEnabled())
-                LOG.trace("Located class [#0] in bundle [#1]", className, bundle.getSymbolicName());
+            LOG.trace("Located class [{}] in bundle [{}]", className, bundle.getSymbolicName());
             return cls;
         }
 

http://git-wip-us.apache.org/repos/asf/struts/blob/8e877115/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiConfigurationProvider.java
----------------------------------------------------------------------
diff --git a/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiConfigurationProvider.java b/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiConfigurationProvider.java
index 63620cb..b24eb8a 100644
--- a/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiConfigurationProvider.java
+++ b/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiConfigurationProvider.java
@@ -115,9 +115,7 @@ public class OsgiConfigurationProvider implements PackageProvider, BundleListene
      */
     protected void loadConfigFromBundle(Bundle bundle) {
         String bundleName = bundle.getSymbolicName();
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Loading packages from bundle [#0]", bundleName);
-        }
+        LOG.debug("Loading packages from bundle [{}]", bundleName);
 
         //init action context
         ActionContext ctx = ActionContext.getContext();
@@ -132,9 +130,7 @@ public class OsgiConfigurationProvider implements PackageProvider, BundleListene
             ctx.put(ClassLoaderInterface.CLASS_LOADER_INTERFACE, new BundleClassLoaderInterface());
             ctx.put(BundleAccessor.CURRENT_BUNDLE_NAME, bundleName);
 
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("Loading XML config from bundle [#0]", bundleName);
-            }
+            LOG.trace("Loading XML config from bundle [{}]", bundleName);
 
             //XML config
             PackageLoader loader = new BundlePackageLoader();
@@ -149,8 +145,7 @@ public class OsgiConfigurationProvider implements PackageProvider, BundleListene
 
             PackageProvider conventionPackageProvider = configuration.getContainer().getInstance(PackageProvider.class, "convention.packageProvider");
             if (conventionPackageProvider != null) {
-                if (LOG.isTraceEnabled())
-                    LOG.trace("Loading Convention config from bundle [#0]", bundleName);
+                LOG.trace("Loading Convention config from bundle [{}]", bundleName);
                 conventionPackageProvider.loadPackages();
             }
 
@@ -235,8 +230,7 @@ public class OsgiConfigurationProvider implements PackageProvider, BundleListene
         if (bundleName != null && shouldProcessBundle(bundle)) {
             switch (bundleEvent.getType()) {
                 case BundleEvent.STARTED:
-                    if (LOG.isTraceEnabled())
-                        LOG.trace("The bundlde [#0] has been activated and will be scanned for struts configuration", bundleName);
+                    LOG.trace("The bundle [{}] has been activated and will be scanned for struts configuration", bundleName);
                     loadConfigFromBundle(bundle);
                     break;
                 case BundleEvent.STOPPED:
@@ -255,7 +249,7 @@ public class OsgiConfigurationProvider implements PackageProvider, BundleListene
         Set<String> packages = bundleAccessor.getPackagesByBundle(bundle);
         if (!packages.isEmpty()) {
             if (LOG.isTraceEnabled()) {
-                LOG.trace("The bundle [#0] has been stopped. The packages [#1] will be disabled", bundle.getSymbolicName(), StringUtils.join(packages, ","));
+                LOG.trace("The bundle [{}] has been stopped. The packages [{}] will be disabled", bundle.getSymbolicName(), StringUtils.join(packages, ","));
             }
             for (String packageName : packages) {
                 configuration.removePackageConfig(packageName);

http://git-wip-us.apache.org/repos/asf/struts/blob/8e877115/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiUtil.java
----------------------------------------------------------------------
diff --git a/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiUtil.java b/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiUtil.java
index b5eaf6f..60c478a 100644
--- a/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiUtil.java
+++ b/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiUtil.java
@@ -58,8 +58,7 @@ public class OsgiUtil {
             Method getBeanMethod = beanFactory.getClass().getMethod("getBean", String.class);
             return getBeanMethod.invoke(beanFactory, beanId);
         } catch (Exception ex) {
-            if (LOG.isErrorEnabled())
-                LOG.error("Unable to call getBean() on object of type [#0], with bean id [#1]", ex, beanFactory.getClass().getName(), beanId);
+            LOG.error("Unable to call getBean() on object of type [{}], with bean id [{}]",  beanFactory.getClass().getName(), beanId, ex);
         }
 
         return null;
@@ -74,8 +73,7 @@ public class OsgiUtil {
             Method getBeanMethod = beanFactory.getClass().getMethod("containsBean", String.class);
             return (Boolean) getBeanMethod.invoke(beanFactory, beanId);
         } catch (Exception ex) {
-            if (LOG.isErrorEnabled())
-                LOG.error("Unable to call containsBean() on object of type [#0], with bean id [#1]", ex, beanFactory.getClass().getName(), beanId);
+            LOG.error("Unable to call containsBean() on object of type [{}], with bean id [{}]", beanFactory.getClass().getName(), beanId, ex);
         }
 
         return false;

http://git-wip-us.apache.org/repos/asf/struts/blob/8e877115/plugins/osgi/src/main/java/org/apache/struts2/osgi/StrutsOsgiListener.java
----------------------------------------------------------------------
diff --git a/plugins/osgi/src/main/java/org/apache/struts2/osgi/StrutsOsgiListener.java b/plugins/osgi/src/main/java/org/apache/struts2/osgi/StrutsOsgiListener.java
index b379538..f594899 100644
--- a/plugins/osgi/src/main/java/org/apache/struts2/osgi/StrutsOsgiListener.java
+++ b/plugins/osgi/src/main/java/org/apache/struts2/osgi/StrutsOsgiListener.java
@@ -25,9 +25,8 @@ public class StrutsOsgiListener implements ServletContextListener {
         ServletContext servletContext = sce.getServletContext();
 
         String platform = servletContext.getInitParameter(PLATFORM_KEY);
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Defined OSGi platform as [#0] via context-param [#1]", platform, PLATFORM_KEY);
-        }
+        LOG.debug("Defined OSGi platform as [{}] via context-param [{}]", platform, PLATFORM_KEY);
+
         osgiHost = OsgiHostFactory.createOsgiHost(platform);
         servletContext.setAttribute(OSGI_HOST, osgiHost);
         try {

http://git-wip-us.apache.org/repos/asf/struts/blob/8e877115/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/BaseOsgiHost.java
----------------------------------------------------------------------
diff --git a/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/BaseOsgiHost.java b/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/BaseOsgiHost.java
index 0225616..fdd5c74 100644
--- a/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/BaseOsgiHost.java
+++ b/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/BaseOsgiHost.java
@@ -145,19 +145,17 @@ public abstract class BaseOsgiHost implements OsgiHost {
                         for (String runLevel : runLevelDirs) {
                             dirs.put(runLevel, StringUtils.chomp(dir,  "/") + "/" + runLevel);
                         }
-                    } else if (LOG.isDebugEnabled()) {
-                        LOG.debug("No run level directories found under the [#0] directory", dir);
+                    } else {
+                        LOG.debug("No run level directories found under the [{}] directory", dir);
                     }
-                } else if (LOG.isWarnEnabled()) {
-                    LOG.warn("Unable to read [#0] directory", dir);
+                } else {
+                    LOG.warn("Unable to read [{}] directory", dir);
                 }
-            } else if (LOG.isWarnEnabled()) {
-                LOG.warn("The [#0] directory was not found", dir);
+            } else {
+                LOG.warn("The [{}] directory was not found", dir);
             }
         } catch (Exception e) {
-            if (LOG.isWarnEnabled()) {
-                LOG.warn("Unable load bundles from the [#0] directory", e, dir);
-            }
+            LOG.warn("Unable load bundles from the [{}] directory", dir, e);
         }
         return dirs;
     }
@@ -180,25 +178,21 @@ public abstract class BaseOsgiHost implements OsgiHost {
                         //add all the bundles to the list
                         for (File bundle : bundles) {
                             String externalForm = bundle.toURI().toURL().toExternalForm();
-                            if (LOG.isDebugEnabled()) {
-                                LOG.debug("Adding bundle [#0]", externalForm);
-                            }
+                            LOG.debug("Adding bundle [{}]", externalForm);
                             bundleJars.add(externalForm);
                         }
 
-                    } else if (LOG.isDebugEnabled()) {
-                        LOG.debug("No bundles found under the [#0] directory", dir);
+                    } else {
+                        LOG.debug("No bundles found under the [{}] directory", dir);
                     }
-                } else if (LOG.isWarnEnabled()) {
-                    LOG.warn("Unable to read [#0] directory", dir);
+                } else {
+                    LOG.warn("Unable to read [{}] directory", dir);
                 }
-            } else if (LOG.isWarnEnabled()) {
-                LOG.warn("The [#0] directory was not found", dir);
+            } else {
+                LOG.warn("The [{}] directory was not found", dir);
             }
         } catch (Exception e) {
-            if (LOG.isWarnEnabled()) {
-                LOG.warn("Unable load bundles from the [#0] directory", e, dir);
-            }
+            LOG.warn("Unable load bundles from the [{}] directory", dir, e);
         }
         return bundleJars;
     }
@@ -254,9 +248,7 @@ public abstract class BaseOsgiHost implements OsgiHost {
                     }
                 }
             } catch (IOException e) {
-                if (LOG.isErrorEnabled()) {
-                    LOG.error("Unable to find subpackages of [#0]", e, rootPackage);
-                }
+                LOG.error("Unable to find subpackages of [{}]", rootPackage, e);
             }
         }
 
@@ -287,9 +279,7 @@ public abstract class BaseOsgiHost implements OsgiHost {
                     return getVersionFromString(jarFile.getName());
                 }
             } catch (Exception e) {
-                if (LOG.isErrorEnabled()) {
-                    LOG.error("Unable to extract version from [#0], defaulting to '1.0.0'", url.toExternalForm());
-                }
+                LOG.error("Unable to extract version from [{}], defaulting to '1.0.0'", url.toExternalForm());
             }
         }
         return "1.0.0";

http://git-wip-us.apache.org/repos/asf/struts/blob/8e877115/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/FelixOsgiHost.java
----------------------------------------------------------------------
diff --git a/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/FelixOsgiHost.java b/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/FelixOsgiHost.java
index f1393ea..259fe2e 100644
--- a/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/FelixOsgiHost.java
+++ b/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/FelixOsgiHost.java
@@ -73,13 +73,11 @@ public class FelixOsgiHost extends BaseOsgiHost {
         // Bundle cache
         String storageDir = System.getProperty("java.io.tmpdir") + ".felix-cache";
         configProps.setProperty(Constants.FRAMEWORK_STORAGE, storageDir);
-        if (LOG.isDebugEnabled())
-            LOG.debug("Storing bundles at [#0]", storageDir);
+        LOG.debug("Storing bundles at [{}]", storageDir);
 
         String cleanBundleCache = getServletContextParam("struts.osgi.clearBundleCache", "true");
         if ("true".equalsIgnoreCase(cleanBundleCache)) {
-            if (LOG.isDebugEnabled())
-                LOG.debug("Clearing bundle cache");
+            LOG.debug("Clearing bundle cache");
             configProps.put(FelixConstants.FRAMEWORK_STORAGE_CLEAN, FelixConstants.FRAMEWORK_STORAGE_CLEAN_ONFIRSTINIT);
         }
 
@@ -95,9 +93,7 @@ public class FelixOsgiHost extends BaseOsgiHost {
             AutoProcessor.process(configProps, felix.getBundleContext());
             felix.start();
 
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("Apache Felix is running");
-            }
+            LOG.trace("Apache Felix is running");
         }
         catch (Exception ex) {
             throw new ConfigurationException("Couldn't start Apache Felix", ex);
@@ -144,9 +140,7 @@ public class FelixOsgiHost extends BaseOsgiHost {
     @Override
     public void destroy() throws Exception {
         felix.stop();
-        if (LOG.isTraceEnabled()) {
-            LOG.trace("Apache Felix has stopped");
-        }
+        LOG.trace("Apache Felix has stopped");
     }
 
     @Override
@@ -163,11 +157,8 @@ public class FelixOsgiHost extends BaseOsgiHost {
                 LOG.debug("Spring OSGi support is not enabled");
             }
         } catch (Exception e) {
-            if (LOG.isErrorEnabled()) {
-                LOG.error("The API of Spring OSGi has changed and the field [#0] is no longer available. The OSGi plugin needs to be updated", e,
-                        "org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext.BUNDLE_CONTEXT_ATTRIBUTE");
-            }
+            LOG.error("The API of Spring OSGi has changed and the field [{}] is no longer available. The OSGi plugin needs to be updated",
+                        "org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext.BUNDLE_CONTEXT_ATTRIBUTE", e);
         }
     }
-
 }

http://git-wip-us.apache.org/repos/asf/struts/blob/8e877115/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/GlassfishOSGiHost.java
----------------------------------------------------------------------
diff --git a/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/GlassfishOSGiHost.java b/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/GlassfishOSGiHost.java
index 9744fb0..dfd5e94 100644
--- a/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/GlassfishOSGiHost.java
+++ b/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/GlassfishOSGiHost.java
@@ -138,12 +138,9 @@ public class GlassfishOSGiHost extends BaseOsgiHost implements OsgiHost {
                 LOG.debug("Spring OSGi support is not enabled");
             }
         } catch (Exception e) {
-            if (LOG.isErrorEnabled()) {
-                LOG.error(
-                        "The API of Spring OSGi has changed and the field [#0] is no longer available. The OSGi plugin needs to be updated",
-                        e,
-                        "org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext.BUNDLE_CONTEXT_ATTRIBUTE");
-            }
+            LOG.error(
+                        "The API of Spring OSGi has changed and the field [[}] is no longer available. The OSGi plugin needs to be updated",
+                        "org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext.BUNDLE_CONTEXT_ATTRIBUTE", e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/struts/blob/8e877115/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/DefaultOValValidationManager.java
----------------------------------------------------------------------
diff --git a/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/DefaultOValValidationManager.java b/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/DefaultOValValidationManager.java
index b748fce..fdd8aae 100644
--- a/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/DefaultOValValidationManager.java
+++ b/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/DefaultOValValidationManager.java
@@ -158,9 +158,7 @@ public class DefaultOValValidationManager implements OValValidationManager {
                 is = fileManager.loadFile(fileUrl);
 
                 if (is != null) {
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug("Loading validation xml file [#0]", fileName);
-                    }
+                    LOG.debug("Loading validation xml file [{}]", fileName);
                     XMLConfigurer configurer = new XMLConfigurer();
                     configurer.fromXML(is);
                     validatorFileCache.put(fileName, configurer);
@@ -171,7 +169,7 @@ public class DefaultOValValidationManager implements OValValidationManager {
                     try {
                         is.close();
                     } catch (java.io.IOException e) {
-                        LOG.error("Unable to close input stream for [#0] ", e, fileName);
+                        LOG.error("Unable to close input stream for [{}] ", fileName, e);
                     }
                 }
             }

http://git-wip-us.apache.org/repos/asf/struts/blob/8e877115/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/OValValidationInterceptor.java
----------------------------------------------------------------------
diff --git a/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/OValValidationInterceptor.java b/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/OValValidationInterceptor.java
index b4d5410..6465020 100644
--- a/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/OValValidationInterceptor.java
+++ b/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/OValValidationInterceptor.java
@@ -100,7 +100,7 @@ public class OValValidationInterceptor extends MethodFilterInterceptor {
         String context = proxy.getConfig().getName();
 
         if (LOG.isDebugEnabled()) {
-            LOG.debug("Validating [#0/#1] with method [#2]", invocation.getProxy().getNamespace(), invocation.getProxy().getActionName(), methodName);
+            LOG.debug("Validating [{}/{}] with method [{}]", invocation.getProxy().getNamespace(), invocation.getProxy().getActionName(), methodName);
         }
 
         //OVal vallidatio (no XML yet)
@@ -118,9 +118,7 @@ public class OValValidationInterceptor extends MethodFilterInterceptor {
             Exception exception = null;
 
             Validateable validateable = (Validateable) action;
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Invoking validate() on action [#0]", validateable.toString());
-            }
+            LOG.debug("Invoking validate() on action [{}]", validateable);
 
             try {
                 PrefixMethodInvocationUtil.invokePrefixMethod(
@@ -129,9 +127,7 @@ public class OValValidationInterceptor extends MethodFilterInterceptor {
             } catch (Exception e) {
                 // If any exception occurred while doing reflection, we want
                 // validate() to be executed
-                if (LOG.isWarnEnabled()) {
-                    LOG.warn("An exception occured while executing the prefix method", e);
-                }
+                LOG.warn("An exception occurred while executing the prefix method", e);
                 exception = e;
             }
 
@@ -160,9 +156,7 @@ public class OValValidationInterceptor extends MethodFilterInterceptor {
                 String[] profileNames = profiles.value();
                 if (profileNames != null && profileNames.length > 0) {
                     validator.disableAllProfiles();
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug("Enabling profiles [#0]", StringUtils.join(profileNames, ","));
-                    }
+                    LOG.debug("Enabling profiles [{}]", StringUtils.join(profileNames, ","));
                     for (String profileName : profileNames)
                         validator.enableProfile(profileName);
                 }
@@ -194,9 +188,7 @@ public class OValValidationInterceptor extends MethodFilterInterceptor {
                 }
 
                 if (isActionError(violation)) {
-                    if (LOG.isDebugEnabled()) {
-                	LOG.debug("Adding action error '#0'", message);
-                    }
+                	LOG.debug("Adding action error '{}'", message);
                     validatorContext.addActionError(message);
                 } else {
                     ValidationError validationError = buildValidationError(violation, message);
@@ -207,9 +199,7 @@ public class OValValidationInterceptor extends MethodFilterInterceptor {
                     	fieldName = parentFieldname + "." + fieldName;
                     }
 
-                    if (LOG.isDebugEnabled()) {
-                	LOG.debug("Adding field error [#0] with message '#1'", fieldName, validationError.getMessage());
-                    }
+                	LOG.debug("Adding field error [{}] with message '{}'", fieldName, validationError.getMessage());
                     validatorContext.addFieldError(fieldName, validationError.getMessage());
 
                     // don't add "model." prefix to fields of model in model driven action

http://git-wip-us.apache.org/repos/asf/struts/blob/8e877115/plugins/pell-multipart/src/main/java/org/apache/struts2/dispatcher/multipart/PellMultiPartRequest.java
----------------------------------------------------------------------
diff --git a/plugins/pell-multipart/src/main/java/org/apache/struts2/dispatcher/multipart/PellMultiPartRequest.java b/plugins/pell-multipart/src/main/java/org/apache/struts2/dispatcher/multipart/PellMultiPartRequest.java
index 0e5402d..9f9b4b8 100644
--- a/plugins/pell-multipart/src/main/java/org/apache/struts2/dispatcher/multipart/PellMultiPartRequest.java
+++ b/plugins/pell-multipart/src/main/java/org/apache/struts2/dispatcher/multipart/PellMultiPartRequest.java
@@ -181,9 +181,7 @@ public class PellMultiPartRequest implements MultiPartRequest {
                 }
                 if ((currentFile != null) && currentFile.isFile()) {
                     if (!currentFile.delete()) {
-                        if (LOG.isWarnEnabled()) {
-                            LOG.warn("Resource Leaking:  Could not remove uploaded file [#0]", currentFile.getAbsolutePath());
-                        }
+                        LOG.warn("Resource Leaking: Could not remove uploaded file [{}]", currentFile.getAbsolutePath());
                     }
                 }
             }

http://git-wip-us.apache.org/repos/asf/struts/blob/8e877115/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java
----------------------------------------------------------------------
diff --git a/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java b/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java
index b3f9a53..5aa7e79 100644
--- a/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java
+++ b/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java
@@ -109,9 +109,7 @@ public class ClassReloadingXMLWebApplicationContext extends XmlWebApplicationCon
                 classLoader.addResourceStore(new JarResourceStore(file));
                 //register with the fam
                 fam.addListener(file, this);
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Watching [#0] for changes", file.getAbsolutePath());
-                }
+                LOG.debug("Watching [{}] for changes", file.getAbsolutePath());
             } else {
                 //get all subdirs
                 List<File> dirs = new ArrayList<File>();
@@ -122,9 +120,7 @@ public class ClassReloadingXMLWebApplicationContext extends XmlWebApplicationCon
                 for (File dir : dirs) {
                     //register with the fam
                     fam.addListener(dir, this);
-                    if (LOG.isDebugEnabled()) {
-                	LOG.debug("Watching [#0] for changes", dir.getAbsolutePath());
-                    }
+                	LOG.debug("Watching [{}] for changes", dir.getAbsolutePath());
                 }
             }
         }
@@ -206,12 +202,10 @@ public class ClassReloadingXMLWebApplicationContext extends XmlWebApplicationCon
     private void reload(File file) {
         if (classLoader != null) {
             final boolean debugEnabled = LOG.isDebugEnabled();
-            if (debugEnabled)
-                LOG.debug("Change detected in file [#0], reloading class loader", file.getAbsolutePath());
+            LOG.debug("Change detected in file [{}], reloading class loader", file.getAbsolutePath());
             classLoader.reload();
             if (reloadConfig && Dispatcher.getInstance() != null) {
-                if (debugEnabled)
-                    LOG.debug("Change detected in file [#0], reloading configuration", file.getAbsolutePath());
+                LOG.debug("Change detected in file [{}], reloading configuration", file.getAbsolutePath());
                 Dispatcher.getInstance().getConfigurationManager().reload();
             }
         }

http://git-wip-us.apache.org/repos/asf/struts/blob/8e877115/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java b/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java
index 917a376..1f7cfc4 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java
@@ -198,9 +198,7 @@ public class DefaultActionInvocation implements ActionInvocation {
         try {
             resultConfig = results.get(resultCode);
         } catch (NullPointerException e) {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Got NPE trying to read result configuration for resultCode [#0]", resultCode);
-            }
+            LOG.debug("Got NPE trying to read result configuration for resultCode [{}]", resultCode);
         }
         
         if (resultConfig == null) {
@@ -212,9 +210,7 @@ public class DefaultActionInvocation implements ActionInvocation {
             try {
                 return objectFactory.buildResult(resultConfig, invocationContext.getContextMap());
             } catch (Exception e) {
-                if (LOG.isErrorEnabled()) {
-                    LOG.error("There was an exception while instantiating the result of type #0", e, resultConfig.getClassName());
-                }
+                LOG.error("There was an exception while instantiating the result of type {}", resultConfig.getClassName(), e);
                 throw new XWorkException(e, resultConfig);
             }
         } else if (resultCode != null && !Action.NONE.equals(resultCode) && unknownHandlerManager.hasUnknownHandlers()) {
@@ -409,9 +405,7 @@ public class DefaultActionInvocation implements ActionInvocation {
     protected String invokeAction(Object action, ActionConfig actionConfig) throws Exception {
         String methodName = proxy.getMethod();
 
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Executing action method = #0", methodName);
-        }
+        LOG.debug("Executing action method = {}", methodName);
 
         String timerKey = "invokeAction: " + proxy.getActionName();
         try {

http://git-wip-us.apache.org/repos/asf/struts/blob/8e877115/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultActionProxy.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultActionProxy.java b/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultActionProxy.java
index e66d269..544fbf3 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultActionProxy.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultActionProxy.java
@@ -76,9 +76,7 @@ public class DefaultActionProxy implements ActionProxy, Serializable {
 
         this.invocation = inv;
         this.cleanupContext = cleanupContext;
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Creating an DefaultActionProxy for namespace [#0] and action name [#1]", namespace, actionName);
-        }
+        LOG.debug("Creating an DefaultActionProxy for namespace [{}] and action name [{}]", namespace, actionName);
 
         this.actionName = StringEscapeUtils.escapeHtml4(actionName);
         this.namespace = namespace;

http://git-wip-us.apache.org/repos/asf/struts/blob/8e877115/xwork-core/src/main/java/com/opensymphony/xwork2/config/ConfigurationManager.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/ConfigurationManager.java b/xwork-core/src/main/java/com/opensymphony/xwork2/config/ConfigurationManager.java
index d853322..a850f79 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/ConfigurationManager.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/config/ConfigurationManager.java
@@ -149,9 +149,7 @@ public class ConfigurationManager {
         try {
             containerProvider.destroy();
         } catch (Exception e) {
-            if (LOG.isWarnEnabled()) {
-                LOG.warn("Error while destroying container provider [#0]", e, containerProvider.toString());
-            }
+            LOG.warn("Error while destroying container provider [{}]", containerProvider.toString(), e);
         }
     }
 
@@ -172,9 +170,7 @@ public class ConfigurationManager {
      */
     public synchronized void conditionalReload() {
         if (reloadConfigs || providersChanged) {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Checking ConfigurationProviders for reload.");
-            }
+            LOG.debug("Checking ConfigurationProviders for reload.");
             List<ContainerProvider> providers = getContainerProviders();
             boolean reload = needReloadContainerProviders(providers);
             if (!reload) {
@@ -191,7 +187,7 @@ public class ConfigurationManager {
     private void updateReloadConfigsFlag() {
         reloadConfigs = Boolean.parseBoolean(configuration.getContainer().getInstance(String.class, XWorkConstants.RELOAD_XML_CONFIGURATION));
         if (LOG.isDebugEnabled()) {
-            LOG.debug("Updating [#0], current value is [#1], new value [#2]",
+            LOG.debug("Updating [{}], current value is [{}], new value [{}]",
                     XWorkConstants.RELOAD_XML_CONFIGURATION, String.valueOf(reloadConfigs), String.valueOf(reloadConfigs));
         }
     }
@@ -200,9 +196,7 @@ public class ConfigurationManager {
         if (packageProviders != null) {
             for (PackageProvider provider : packageProviders) {
                 if (provider.needsReload()) {
-                    if (LOG.isInfoEnabled()) {
-                        LOG.info("Detected package provider [#0] needs to be reloaded. Reloading all providers.", provider.toString());
-                    }
+                    LOG.info("Detected package provider [{}] needs to be reloaded. Reloading all providers.", provider);
                     return true;
                 }
             }
@@ -213,9 +207,7 @@ public class ConfigurationManager {
     private boolean needReloadContainerProviders(List<ContainerProvider> providers) {
         for (ContainerProvider provider : providers) {
             if (provider.needsReload()) {
-                if (LOG.isInfoEnabled()) {
-                    LOG.info("Detected container provider [#0] needs to be reloaded. Reloading all providers.", provider.toString());
-                }
+                LOG.info("Detected container provider [{}] needs to be reloaded. Reloading all providers.", provider);
                 return true;
             }
         }
@@ -227,9 +219,7 @@ public class ConfigurationManager {
             try {
                 containerProvider.destroy();
             } catch (Exception e) {
-                if (LOG.isWarnEnabled()) {
-                    LOG.warn("error while destroying configuration provider [#0]", e, containerProvider.toString());
-                }
+                LOG.warn("error while destroying configuration provider [{}]", containerProvider, e);
             }
         }
         packageProviders = this.configuration.reloadContainer(providers);

http://git-wip-us.apache.org/repos/asf/struts/blob/8e877115/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/InterceptorBuilder.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/InterceptorBuilder.java b/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/InterceptorBuilder.java
index f60f7d8..5c3e360 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/InterceptorBuilder.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/InterceptorBuilder.java
@@ -70,11 +70,9 @@ public class InterceptorBuilder {
                     inter = objectFactory.buildInterceptor(config, refParams);
                     result.add(new InterceptorMapping(refName, inter));
                 } catch (ConfigurationException ex) {
-                    if (LOG.isWarnEnabled()) {
-                	    LOG.warn("Unable to load config class #0 at #1 probably due to a missing jar, which might be fine if you never plan to use the #2 interceptor",
-                            config.getClassName(), ex.getLocation().toString(), config.getName());
-                    }
-                    LOG.error("Actual exception", ex);
+              	    LOG.warn("Unable to load config class {} at {} probably due to a missing jar, which might be fine if you never plan to use the {} interceptor",
+                            config.getClassName(), ex.getLocation(), config.getName());
+                    LOG.error("Unable to load config class {}", config.getClassName(), ex);
                 }
 
             } else if (referencedConfig instanceof InterceptorStackConfig) {
@@ -87,7 +85,7 @@ public class InterceptorBuilder {
                 }
 
             } else {
-                LOG.error("Got unexpected type for interceptor " + refName + ". Got " + referencedConfig);
+                LOG.error("Got unexpected type for interceptor {}. Got {}", refName, referencedConfig);
             }
         }
 
@@ -148,9 +146,7 @@ public class InterceptorBuilder {
                 params.put(name, map);
 
             } catch (Exception e) {
-                if (LOG.isWarnEnabled()) {
-                    LOG.warn("No interceptor found for name = #0", key);
-                }
+                LOG.warn("No interceptor found for name = {}", key);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/struts/blob/8e877115/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java b/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
index 4f6f5ab..fe84e09 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
@@ -246,9 +246,7 @@ public class XmlConfigurationProvider implements ConfigurationProvider {
                             if (!optional) {
                                 throw new ConfigurationException("Unable to load bean: type:" + type + " class:" + impl, ex, childNode);
                             } else {
-                                if (LOG.isDebugEnabled()) {
-                                    LOG.debug("Unable to load optional class: #0", impl);
-                                }
+                                LOG.debug("Unable to load optional class: {}", impl);
                             }
                         }
                     } else if ("constant".equals(nodeName)) {
@@ -427,9 +425,7 @@ public class XmlConfigurationProvider implements ConfigurationProvider {
 
         } else {
             if (!verifyAction(className, name, location)) {
-                if (LOG.isErrorEnabled()) {
-                    LOG.error("Unable to verify action [#0] with class [#1], from [#2]", name, className, location);
-                }
+                LOG.error("Unable to verify action [{}] with class [{}], from [{}]", name, className, location);
                 return;
             }
         }
@@ -465,10 +461,7 @@ public class XmlConfigurationProvider implements ConfigurationProvider {
 
     protected boolean verifyAction(String className, String name, Location loc) {
         if (className.indexOf('{') > -1) {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Action class [" + className + "] contains a wildcard " +
-                        "replacement value, so it can't be verified");
-            }
+            LOG.debug("Action class [{}] contains a wildcard replacement value, so it can't be verified", className);
             return true;
         }
         try {
@@ -480,28 +473,18 @@ public class XmlConfigurationProvider implements ConfigurationProvider {
                 clazz.getConstructor(new Class[]{});
             }
         } catch (ClassNotFoundException e) {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Class not found for action [#0]", e, className);
-            }
+            LOG.debug("Class not found for action [{}]", className, e);
             throw new ConfigurationException("Action class [" + className + "] not found", loc);
         } catch (NoSuchMethodException e) {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("No constructor found for action [#0]", e, className);
-            }
+            LOG.debug("No constructor found for action [{}]", className, e);
             throw new ConfigurationException("Action class [" + className + "] does not have a public no-arg constructor", e, loc);
         } catch (RuntimeException ex) {
             // Probably not a big deal, like request or session-scoped Spring 2 beans that need a real request
-            if (LOG.isInfoEnabled()) {
-                LOG.info("Unable to verify action class [#0] exists at initialization", className);
-            }
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Action verification cause", ex);
-            }
+            LOG.info("Unable to verify action class [{}] exists at initialization", className);
+            LOG.debug("Action verification cause", ex);
         } catch (Exception ex) {
             // Default to failing fast
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Unable to verify action class [#0]", ex, className);
-            }
+            LOG.debug("Unable to verify action class [{}]", className, ex);
             throw new ConfigurationException(ex, loc);
         }
         return true;
@@ -514,9 +497,7 @@ public class XmlConfigurationProvider implements ConfigurationProvider {
         String packageName = packageElement.getAttribute("name");
         PackageConfig packageConfig = configuration.getPackageConfig(packageName);
         if (packageConfig != null) {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Package [#0] already loaded, skipping re-loading it and using existing PackageConfig [#1]", packageName, packageConfig);
-            }
+            LOG.debug("Package [{}] already loaded, skipping re-loading it and using existing PackageConfig [{}]", packageName, packageConfig);
             return packageConfig;
         }
 
@@ -526,9 +507,7 @@ public class XmlConfigurationProvider implements ConfigurationProvider {
             return newPackage.build();
         }
 
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Loaded " + newPackage);
-        }
+        LOG.debug("Loaded {}", newPackage);
 
         // add result types (and default result) to this package
         addResultTypes(newPackage, packageElement);
@@ -581,9 +560,7 @@ public class XmlConfigurationProvider implements ConfigurationProvider {
                 try {
                     paramName = (String) clazz.getField("DEFAULT_PARAM").get(null);
                 } catch (Throwable t) {
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug("The result type [#0] doesn't have a default param [DEFAULT_PARAM] defined!", t, className);
-                    }
+                    LOG.debug("The result type [{}] doesn't have a default param [DEFAULT_PARAM] defined!", className, t);
                 }
                 ResultTypeConfig.Builder resultType = new ResultTypeConfig.Builder(name, className).defaultResultParam(paramName)
                         .location(DomHelper.getLocationObject(resultTypeElement));
@@ -607,13 +584,9 @@ public class XmlConfigurationProvider implements ConfigurationProvider {
         try {
             return objectFactory.getClassInstance(className);
         } catch (ClassNotFoundException e) {
-            if (LOG.isWarnEnabled()) {
-                LOG.warn("Result class [#0] doesn't exist (ClassNotFoundException) at #1, ignoring", e, className, loc.toString());
-            }
+            LOG.warn("Result class [{}] doesn't exist (ClassNotFoundException) at {}, ignoring", className, loc, e);
         } catch (NoClassDefFoundError e) {
-            if (LOG.isWarnEnabled()) {
-                LOG.warn("Result class [#0] doesn't exist (NoClassDefFoundError) at #1, ignoring", e, className, loc.toString());
-            }
+            LOG.warn("Result class [{}] doesn't exist (NoClassDefFoundError) at {}, ignoring", className, loc, e);
         }
 
         return null;
@@ -758,9 +731,7 @@ public class XmlConfigurationProvider implements ConfigurationProvider {
                                 resultParams.put(paramName, val);
                             }
                         } else {
-                            if (LOG.isWarnEnabled()) {
-                                LOG.warn("No default parameter defined for result [#0] of type [#1] ", config.getName(), config.getClassName());
-                            }
+                            LOG.warn("No default parameter defined for result [{}] of type [{}] ", config.getName(), config.getClassName());
                         }
                     }
                 }

http://git-wip-us.apache.org/repos/asf/struts/blob/8e877115/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionAnnotationProcessor.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionAnnotationProcessor.java b/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionAnnotationProcessor.java
index d22cf54..2f64dbc 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionAnnotationProcessor.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionAnnotationProcessor.java
@@ -35,7 +35,7 @@ public class DefaultConversionAnnotationProcessor implements ConversionAnnotatio
 
     public void process(Map<String, Object> mapping, TypeConversion tc, String key) {
         if (LOG.isDebugEnabled()) {
-            LOG.debug("TypeConversion [#0] with key: [#1]", tc.converter(), key);
+            LOG.debug("TypeConversion [{}] with key: [{}]", tc.converter(), key);
         }
         if (key == null) {
             return;
@@ -54,9 +54,7 @@ public class DefaultConversionAnnotationProcessor implements ConversionAnnotatio
                 //for keys of Maps
                 else if (tc.rule() == ConversionRule.KEY) {
                     Class converterClass = Thread.currentThread().getContextClassLoader().loadClass(tc.converter());
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug("Converter class: [#0]", converterClass);
-                    }
+                    LOG.debug("Converter class: [{}]", converterClass);
                     //check if the converter is a type converter if it is one
                     //then just put it in the map as is. Otherwise
                     //put a value in for the type converter of the class
@@ -65,7 +63,7 @@ public class DefaultConversionAnnotationProcessor implements ConversionAnnotatio
                     } else {
                         mapping.put(key, converterClass);
                         if (LOG.isDebugEnabled()) {
-                            LOG.debug("Object placed in mapping for key [#0] is [#1]", key, mapping.get(key));
+                            LOG.debug("Object placed in mapping for key [{}] is [{}]", key, mapping.get(key));
                         }
                     }
                 }
@@ -75,9 +73,7 @@ public class DefaultConversionAnnotationProcessor implements ConversionAnnotatio
                 }
             }
         } catch (Exception e) {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Got exception for #0", e, key);
-            }
+            LOG.debug("Got exception for {}", key, e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/struts/blob/8e877115/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionFileProcessor.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionFileProcessor.java b/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionFileProcessor.java
index 7fb36d3..5fd0d07 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionFileProcessor.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionFileProcessor.java
@@ -40,7 +40,7 @@ public class DefaultConversionFileProcessor implements ConversionFileProcessor {
 
             if (is != null) {
                 if (LOG.isDebugEnabled()) {
-                    LOG.debug("Processing conversion file [#0] for class [#1]", converterFilename, clazz);
+                    LOG.debug("Processing conversion file [{}] for class [{}]", converterFilename, clazz);
                 }
 
                 Properties prop = new Properties();
@@ -55,9 +55,7 @@ public class DefaultConversionFileProcessor implements ConversionFileProcessor {
                     // for keyProperty of Set
                     if (key.startsWith(DefaultObjectTypeDeterminer.KEY_PROPERTY_PREFIX)
                             || key.startsWith(DefaultObjectTypeDeterminer.CREATE_IF_NULL_PREFIX)) {
-                        if (LOG.isDebugEnabled()) {
-                            LOG.debug("\t" + key + ":" + entry.getValue() + "[treated as String]");
-                        }
+                        LOG.debug("\t{}:{} [treated as String]", key, entry.getValue());
                         mapping.put(key, entry.getValue());
                     }
                     //for properties of classes
@@ -66,9 +64,7 @@ public class DefaultConversionFileProcessor implements ConversionFileProcessor {
                             key.startsWith(DefaultObjectTypeDeterminer.DEPRECATED_ELEMENT_PREFIX))
                             ) {
                         TypeConverter _typeConverter = converterCreator.createTypeConverter((String) entry.getValue());
-                        if (LOG.isDebugEnabled()) {
-                            LOG.debug("\t" + key + ":" + entry.getValue() + "[treated as TypeConverter " + _typeConverter + "]");
-                        }
+                        LOG.debug("\t{}:{} [treated as TypeConverter {}]", key, entry.getValue(), _typeConverter);
                         mapping.put(key, _typeConverter);
                     }
                     //for keys of Maps
@@ -81,31 +77,23 @@ public class DefaultConversionFileProcessor implements ConversionFileProcessor {
                         //put a value in for the type converter of the class
                         if (converterClass.isAssignableFrom(TypeConverter.class)) {
                             TypeConverter _typeConverter = converterCreator.createTypeConverter((String) entry.getValue());
-                            if (LOG.isDebugEnabled()) {
-                                LOG.debug("\t" + key + ":" + entry.getValue() + "[treated as TypeConverter " + _typeConverter + "]");
-                            }
+                            LOG.debug("\t{}:{} [treated as TypeConverter {}]", key, entry.getValue(), _typeConverter);
                             mapping.put(key, _typeConverter);
                         } else {
-                            if (LOG.isDebugEnabled()) {
-                                LOG.debug("\t" + key + ":" + entry.getValue() + "[treated as Class " + converterClass + "]");
-                            }
+                            LOG.debug("\t{}:{} [treated as Class {}]", key, entry.getValue(), converterClass);
                             mapping.put(key, converterClass);
                         }
                     }
                     //elements(values) of maps / lists
                     else {
                         Class _c = Thread.currentThread().getContextClassLoader().loadClass((String) entry.getValue());
-                        if (LOG.isDebugEnabled()) {
-                            LOG.debug("\t" + key + ":" + entry.getValue() + "[treated as Class " + _c + "]");
-                        }
+                        LOG.debug("\t{}:{} [treated as Class {}]", key, entry.getValue(), _c);
                         mapping.put(key, _c);
                     }
                 }
             }
         } catch (Exception ex) {
-            if (LOG.isErrorEnabled()) {
-                LOG.error("Problem loading properties for #0", ex, clazz.getName());
-            }
+            LOG.error("Problem loading properties for {}", clazz.getName(), ex);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/struts/blob/8e877115/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionPropertiesProcessor.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionPropertiesProcessor.java b/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionPropertiesProcessor.java
index d251877..762496f 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionPropertiesProcessor.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionPropertiesProcessor.java
@@ -52,9 +52,7 @@ public class DefaultConversionPropertiesProcessor implements ConversionPropertie
                 Properties props = new Properties();
                 props.load(url.openStream());
 
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("processing conversion file [" + propsName + "]");
-                }
+                LOG.debug("Processing conversion file [{}]", propsName);
 
                 for (Object o : props.entrySet()) {
                     Map.Entry entry = (Map.Entry) o;
@@ -63,7 +61,7 @@ public class DefaultConversionPropertiesProcessor implements ConversionPropertie
                     try {
                         TypeConverter _typeConverter = converterCreator.createTypeConverter((String) entry.getValue());
                         if (LOG.isDebugEnabled()) {
-                            LOG.debug("\t" + key + ":" + entry.getValue() + " [treated as TypeConverter " + _typeConverter + "]");
+                            LOG.debug("\t{}:{} [treated as TypeConverter {}]", key, entry.getValue(), _typeConverter);
                         }
                         converterHolder.addDefaultMapping(key, _typeConverter);
                     } catch (Exception e) {
@@ -75,9 +73,7 @@ public class DefaultConversionPropertiesProcessor implements ConversionPropertie
             if (require) {
                 throw new XWorkException("Cannot load conversion properties file: "+propsName, ex);
             } else {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Cannot load conversion properties file: #0", ex, propsName);
-                }
+                LOG.debug("Cannot load conversion properties file: {}", propsName, ex);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/struts/blob/8e877115/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultObjectTypeDeterminer.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultObjectTypeDeterminer.java b/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultObjectTypeDeterminer.java
index 36c4613..3df9f94 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultObjectTypeDeterminer.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultObjectTypeDeterminer.java
@@ -299,9 +299,7 @@ public class DefaultObjectTypeDeterminer implements ObjectTypeDeterminer {
                 return (Class) resultType;
             }
         } catch (Exception e) {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Error while retrieving generic property class for property = #0", e, property);
-            }
+            LOG.debug("Error while retrieving generic property class for property: {}", property, e);
         }
         return null;
     }


Mime
View raw message