You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by ca...@apache.org on 2006/01/11 23:20:05 UTC

svn commit: r368149 [1/4] - in /logging/sandbox/log4j/formatter: ./ src/ src/changes/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/log4j/ src/main/java/org/apache/log4j/formatter/ src/test/ src/test/jav...

Author: carnold
Date: Wed Jan 11 14:19:48 2006
New Revision: 368149

URL: http://svn.apache.org/viewcvs?rev=368149&view=rev
Log:
Initial commit of formatter to Sandbox

Added:
    logging/sandbox/log4j/formatter/
    logging/sandbox/log4j/formatter/build.xml   (with props)
    logging/sandbox/log4j/formatter/pom.xml   (with props)
    logging/sandbox/log4j/formatter/src/
    logging/sandbox/log4j/formatter/src/changes/
    logging/sandbox/log4j/formatter/src/changes/changes.xml   (with props)
    logging/sandbox/log4j/formatter/src/main/
    logging/sandbox/log4j/formatter/src/main/java/
    logging/sandbox/log4j/formatter/src/main/java/org/
    logging/sandbox/log4j/formatter/src/main/java/org/apache/
    logging/sandbox/log4j/formatter/src/main/java/org/apache/log4j/
    logging/sandbox/log4j/formatter/src/main/java/org/apache/log4j/formatter/
    logging/sandbox/log4j/formatter/src/main/java/org/apache/log4j/formatter/LogF.java   (with props)
    logging/sandbox/log4j/formatter/src/main/java/org/apache/log4j/formatter/LogMF.java   (with props)
    logging/sandbox/log4j/formatter/src/main/java/org/apache/log4j/formatter/LogSF.java   (with props)
    logging/sandbox/log4j/formatter/src/test/
    logging/sandbox/log4j/formatter/src/test/java/
    logging/sandbox/log4j/formatter/src/test/java/org/
    logging/sandbox/log4j/formatter/src/test/java/org/apache/
    logging/sandbox/log4j/formatter/src/test/java/org/apache/log4j/
    logging/sandbox/log4j/formatter/src/test/java/org/apache/log4j/VectorAppender.java   (with props)
    logging/sandbox/log4j/formatter/src/test/java/org/apache/log4j/formatter/
    logging/sandbox/log4j/formatter/src/test/java/org/apache/log4j/formatter/LogCapture.java   (with props)
    logging/sandbox/log4j/formatter/src/test/java/org/apache/log4j/formatter/LogFTest.java   (with props)
    logging/sandbox/log4j/formatter/src/test/java/org/apache/log4j/formatter/LogFTraceTest.java   (with props)
    logging/sandbox/log4j/formatter/src/test/java/org/apache/log4j/formatter/LogMFTest.java   (with props)
    logging/sandbox/log4j/formatter/src/test/java/org/apache/log4j/formatter/LogMFTraceTest.java   (with props)
    logging/sandbox/log4j/formatter/src/test/java/org/apache/log4j/formatter/LogSFTest.java   (with props)
    logging/sandbox/log4j/formatter/src/test/java/org/apache/log4j/formatter/LogSFTraceTest.java   (with props)

Added: logging/sandbox/log4j/formatter/build.xml
URL: http://svn.apache.org/viewcvs/logging/sandbox/log4j/formatter/build.xml?rev=368149&view=auto
==============================================================================
--- logging/sandbox/log4j/formatter/build.xml (added)
+++ logging/sandbox/log4j/formatter/build.xml Wed Jan 11 14:19:48 2006
@@ -0,0 +1,191 @@
+<!--
+  Copyright 1999, 2006 The Apache Software Foundation.
+  
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  
+-->
+<project name="log4j-formatter" default="dist" basedir="." >
+	  <!-- The build.properties file defines the parth to local jar files -->
+	  <property file="build.properties"/>
+
+	  <property name="version" value="0.1"/>
+      <property name="target.dir" value="target"/>
+	  <property name="target-java2.dir" value="${target.dir}/java2"/>
+	  <property name="classes.dir" value="${target.dir}/classes"/>
+	  <property name="classes-java2.dir" value="${target-java2.dir}/classes"/>
+	  <property name="test-classes.dir" value="${target.dir}/test-classes"/>
+
+	  <property name="M2_REPO" value="${user.home}/.m2/repository"/>
+	  <property name="log4j.version" value="1.2.13"/>
+	  <property name="log4j.jar" value="${M2_REPO}/log4j/log4j/${log4j.version}/log4j-${log4j.version}.jar"/>
+	  <property name="junit.version" value="3.8.1"/>
+	  <property name="junit.jar" value="${M2_REPO}/junit/junit/${junit.version}/junit-${junit.version}.jar"/>
+	
+	  <target name="clean" description="Remove generated artifacts">
+	  	  <delete dir="${target.dir}"/>
+	  </target>
+
+	  <target name="init">
+	  </target>
+	  	
+	  <target name="compile" depends="init" description="Compile using Java 5">
+         <mkdir dir="${classes.dir}"/>
+	  	 <javac destdir="${classes.dir}" 
+	  	           srcdir="src/main/java"
+	  			   includes="**/*.java"
+	  	           source="1.5"
+	  	           target="1.5"
+	  		       classpath="${log4j.jar}"/>
+	  </target>
+
+	  <target name="prep-java2" depends="init">
+	  	  <mkdir dir="${target-java2.dir}/src/main/java"/>
+	  	  <copy todir="${target-java2.dir}/src/main/java">
+	  	  	  <fileset dir="src/main/java" 
+	  	  	     includes="**/*.java"
+	  	  	     excludes="**/LogF.java"/>
+	  	  </copy>
+	  	  <replace dir="${target-java2.dir}/src/main/java"
+	  	           includes="**/*.java">
+	  	  	   <replacefilter token="Object..." value="Object[]"/>
+	  	  	   <replacefilter token="Byte.valueOf" value="new Byte"/>
+	  	  	   <replacefilter token="Character.valueOf" value="new Character"/>
+		  	   <replacefilter token="Short.valueOf" value="new Short"/>
+		  	   <replacefilter token="Integer.valueOf" value="new Integer"/>
+		  	   <replacefilter token="Long.valueOf" value="new Long"/>
+	  	  	   <replacefilter token="Double.valueOf" value="new Double"/>
+		  	   <replacefilter token="Float.valueOf" value="new Float"/>
+	  	  </replace>
+	  </target>
+	  	
+	  <target name="compile-java2" depends="prep-java2" description="Compile using Java 2">
+       <mkdir dir="${classes-java2.dir}"/>
+	  	 <javac destdir="${classes-java2.dir}" 
+	  	           srcdir="${target.dir}/java2"
+	  			   includes="**/*.java"
+	  	           source="1.3"
+	  	           target="1.3"
+	  		       classpath="${log4j.jar}"/>
+	  </target>
+	
+	  <target name="jar" depends="compile">	    
+	    <delete file="${target.dir}/log4j-formatter-${version}.jar"/>
+	    <mkdir dir="${target.dir}/"/>
+	    
+	    <jar jarfile="${target.dir}/log4j-formatter-${version}.jar" 
+	    	 basedir="${classes.dir}">
+	      <manifest>
+	        <attribute name="Manifest-version" value="1.0"/>
+	        <section name="org/apache/log4j/formatter/">
+	          <attribute name="Implementation-Title" value="log4j formatting utility"/>
+	          <attribute name="Implementation-Version" value="${version}"/>
+	          <attribute name="Implementation-Vendor" value="Apache Software Foundation"/>
+	        </section>
+	      </manifest>
+	    </jar>
+	  </target>
+
+	  <target name="jar-java2" depends="compile-java2">	    
+	    <delete file="${target.dir}/log4j-formatter-${version}-java2.jar"/>
+	    <mkdir dir="${target.dir}/"/>
+	    
+	    <jar jarfile="${target.dir}/log4j-formatter-${version}-java2.jar" 
+	    	 basedir="${classes.dir}">
+	      <manifest>
+	        <attribute name="Manifest-version" value="1.0"/>
+	        <section name="org/apache/log4j/formatter/">
+	          <attribute name="Implementation-Title" value="log4j formatting utility for Java 2"/>
+	          <attribute name="Implementation-Version" value="${version}"/>
+	          <attribute name="Implementation-Vendor" value="Apache Software Foundation"/>
+	        </section>
+	      </manifest>
+	    </jar>
+	  </target>
+
+	  <target name="testCompile" depends="compile" description="Compile tests">
+       <mkdir dir="${test-classes.dir}"/>
+	  	 <javac destdir="${test-classes.dir}" 
+	  	           srcdir="src/test/java"
+	  			   includes="**/*.java"
+	  	 	       excludes="**/LogFTest*.java **/LogFTraceTest.java"
+	  	           source="1.3"
+	  	           target="1.3"
+	  		       classpath="${classes.dir};${log4j.jar};${junit.jar}"/>
+	       <mkdir dir="${test-classes.dir}"/>
+		  	 <javac destdir="${test-classes.dir}" 
+		  	           srcdir="src/test/java"
+		  	 	       includes="**/LogFTest*.java **/LogFTraceTest.java"
+		  	           source="1.5"
+		  	           target="1.5"
+		  		       classpath="${classes.dir};${log4j.jar};${junit.jar}"/>
+	  </target>
+	
+	  <target name="test" depends="testCompile">
+	    <junit printsummary="yes" 
+	    	fork="yes">
+	  	  <classpath path="${test-classes.dir};${classes.dir};${log4j.jar};${junit.jar}"/>
+	  	  <formatter type="plain" usefile="false"/>
+	  	  <batchtest>
+	  	    <fileset dir="src/test/java" 
+	  	    	includes="**/*.java"
+	  	        excludes="**/VectorAppender.java **/LogCapture.java"/>
+	  	  </batchtest>
+	    </junit>
+	  </target>
+
+	  <target name="test-java2" depends="compile-java2, testCompile">
+	    <junit printsummary="yes" 
+	    	fork="yes">
+	  	  <classpath path="${test-classes.dir};${classes-java2.dir};${log4j.jar};${junit.jar}"/>
+	  	  <formatter type="plain" usefile="false"/>
+	  	  <batchtest>
+	  	    <fileset dir="src/test/java" 
+	  	    	includes="**/*.java"
+	  	        excludes="**/LogF*.java **/VectorAppender.java **/LogCapture.java"/>
+	  	  </batchtest>
+	    </junit>
+	  </target>
+	
+	 <target name="javadoc">	    
+	    <mkdir dir="${target.dir}/javadoc" />	    
+	    <javadoc
+	             destdir="${target.dir}/javadoc"
+	             packagenames="org.apache.log4j.formatter"
+	             additionalparam="-breakiterator"
+	             version="true"
+	             author="true"
+	             use="true"
+	             doctitle="log4j formatter version ${version}&lt;br&gt;API Specification"
+	             windowtitle="Log4j Formatter Version ${version}"
+	             bottom="Copyright 1999,2006 Apache Software Foundation.">
+	         <sourcepath>
+	            <pathelement path="src/main/java"/>
+	         </sourcepath>
+	        <classpath path="${log4j.jar}"/>
+	    </javadoc>
+	 </target>
+	
+	  <target name="dist" depends="test, jar, test-java2, jar-java2, javadoc">
+	    <tar tarfile="${target.dir}/logging-log4j-formatter-${version}.tar.gz"
+	         compression="gzip"
+	         longfile="gnu">
+	    	 <tarfileset dir="." 
+	  				prefix="logging-log4j-formatter-${version}"
+	  	            excludes="target/** .* .settings/**"/>
+	    	 <tarfileset dir="target" 
+	  				prefix="logging-log4j-formatter-${version}"
+	  	            includes="*.jar javadoc/**"/>
+	    </tar>
+	  </target>
+
+</project>
\ No newline at end of file

Propchange: logging/sandbox/log4j/formatter/build.xml
------------------------------------------------------------------------------
    svn:executable = 

Added: logging/sandbox/log4j/formatter/pom.xml
URL: http://svn.apache.org/viewcvs/logging/sandbox/log4j/formatter/pom.xml?rev=368149&view=auto
==============================================================================
--- logging/sandbox/log4j/formatter/pom.xml (added)
+++ logging/sandbox/log4j/formatter/pom.xml Wed Jan 11 14:19:48 2006
@@ -0,0 +1,145 @@
+<!--
+  Copyright 1999, 2006 The Apache Software Foundation.
+  
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.log4j.formatter</groupId>
+  <artifactId>log4j-formatter</artifactId>
+  <packaging>jar</packaging>
+  <version>0.1</version>
+  <name>log4j formatter</name>
+  <description>Message formatting classes for log4j</description>
+  <url>http://logging.apache.org/sandbox/formatter</url>
+  <issueManagement>
+    <system>Bugzilla</system>
+    <url>http://issues.apache.org/bugzilla</url>
+  </issueManagement>
+  <inceptionYear>1999</inceptionYear>
+<mailingLists>
+	<mailingList>
+		<name>log4j-user</name>
+		<subscribe>log4j-user-subscribe@logging.apache.org</subscribe>
+		<unsubscribe>log4j-user-unsubscribe@logging.apache.org</unsubscribe>
+		<post>log4j-user@logging.apache.org</post>
+		<archive>http://mail-archives.apache.org/mod_mbox/logging-log4j-dev/</archive>
+		<otherArchives>
+			<otherArchive>http://marc.theaimsgroup.com/?l=log4j-user&amp;r=1&amp;w=2</otherArchive>
+		    <otherArchive>http://dir.gmane.org/gmane.comp.jakarta.log4j.user</otherArchive>
+		</otherArchives>
+	</mailingList>
+	<mailingList>
+		<name>log4j-dev</name>
+		<subscribe>log4j-dev-subscribe@logging.apache.org</subscribe>
+		<unsubscribe>log4j-dev-unsubscribe@logging.apache.org</unsubscribe>
+		<post>log4j-dev@logging.apache.org</post>
+		<archive>http://mail-archives.apache.org/mod_mbox/logging-log4j-dev/</archive>
+		<otherArchives>
+		    <otherArchive>http://marc.theaimsgroup.com/?l=log4j-dev&amp;r=1&amp;w=2</otherArchive>
+		    <otherArchive>http://dir.gmane.org/gmane.comp.jakarta.log4j.devel</otherArchive>
+		</otherArchives>
+	</mailingList>
+</mailingLists>
+<developers>
+   <developer>
+   	   <id>carnold</id>
+   	   <name>Curt Arnold</name>
+   	   <email>carnold@apache.org</email>
+   	</developer>
+</developers>
+<licenses>
+	<license>
+		<name>Apache License, Version 2.0</name>
+		<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+		<distribution>repo</distribution>
+	</license>
+</licenses>
+<scm>
+	<connection>scm:svn:http://svn.apache.org/repos/asf/logging/sandbox/log4j/formatter</connection>
+	<developerConnection>scm:svn:https://svn.apache.org/repos/asf/logging/sandbox/log4j/formatter</developerConnection>
+	<url>http://svn.apache.org/viewcvs.cgi/logging/sandbox/log4j/formatter</url>
+</scm>
+<organization>
+    <name>Apache Software Foundation</name>
+    <url>http://www.apache.org</url>
+</organization>
+<build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <dependencies>
+          <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+            <version>1.2.13</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+      <plugin>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+            <source>1.5</source>
+            <target>1.5</target>
+        </configuration>
+      </plugin>
+    </plugins>
+</build>
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>log4j</groupId>
+      <artifactId>log4j</artifactId>
+      <version>1.2.13</version>
+    </dependency>
+  </dependencies>
+  <reporting>
+    <plugins>
+      <!-- plugin>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+      </plugin -->
+      <!-- plugin>
+        <artifactId>maven-pmd-plugin</artifactId>
+      </plugin -->
+      <plugin>
+        <artifactId>maven-clover-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <artifactId>maven-javadoc-plugin</artifactId>
+      </plugin>
+      <!-- plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-project-info-reports-plugin</artifactId>
+      </plugin -->
+      <!-- plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>jxr-maven-plugin</artifactId>
+      </plugin -->
+      <!-- plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>changelog-maven-plugin</artifactId>
+      </plugin -->
+      <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>changes-maven-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </reporting>
+</project>

Propchange: logging/sandbox/log4j/formatter/pom.xml
------------------------------------------------------------------------------
    svn:executable = 

Added: logging/sandbox/log4j/formatter/src/changes/changes.xml
URL: http://svn.apache.org/viewcvs/logging/sandbox/log4j/formatter/src/changes/changes.xml?rev=368149&view=auto
==============================================================================
--- logging/sandbox/log4j/formatter/src/changes/changes.xml (added)
+++ logging/sandbox/log4j/formatter/src/changes/changes.xml Wed Jan 11 14:19:48 2006
@@ -0,0 +1,11 @@
+<document>
+   <properties>
+   	  <title>Log4J Message Formatting Utilities</title>
+   	  <author email="carnold@apache.org">Curt Arnold</author>
+   </properties>
+   
+   <body>
+       <release version="0.1" date="2006-01-11" desc="Initial commit to sandbox">
+       </release>
+   </body>
+</document>
\ No newline at end of file

Propchange: logging/sandbox/log4j/formatter/src/changes/changes.xml
------------------------------------------------------------------------------
    svn:executable = 

Added: logging/sandbox/log4j/formatter/src/main/java/org/apache/log4j/formatter/LogF.java
URL: http://svn.apache.org/viewcvs/logging/sandbox/log4j/formatter/src/main/java/org/apache/log4j/formatter/LogF.java?rev=368149&view=auto
==============================================================================
--- logging/sandbox/log4j/formatter/src/main/java/org/apache/log4j/formatter/LogF.java (added)
+++ logging/sandbox/log4j/formatter/src/main/java/org/apache/log4j/formatter/LogF.java Wed Jan 11 14:19:48 2006
@@ -0,0 +1,1155 @@
+/*
+ * Copyright 1999,2006 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.log4j.formatter;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.Level;
+import java.util.IllegalFormatException;
+
+/**
+ * This class provides static methods to
+ * format log messages using java.util.Formatter.
+ * 
+ * @author Curt Arnold
+ *
+ */
+public final class LogF {
+	/**
+	 * Invariant empty array.
+	 */
+	private static final Object[] NO_ARGS = new Object[0];
+
+	/**
+	 * private constructor.
+	 *
+	 */
+	private LogF() {
+	}
+
+	/**
+	 * Formats arguments using MessageFormat.
+	 * @param pattern pattern, may be malformed.
+	 * @param arguments arguments, may be null or mismatched.
+	 * @return Message string
+	 */
+	private static String format(final String pattern, final Object[] arguments) {
+		try {
+			return String.format(pattern, arguments);
+		} catch (IllegalFormatException ex) {
+			return pattern;
+		}
+	}
+
+	/**
+	 * Formats and makes trace level log request.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null or malformed.
+	 * @param arguments may be null or mismatched.
+	 */
+	private static void logTrace(final Logger logger, final String pattern,
+			final Object[] arguments) {
+		if (pattern != null) {
+			logger.trace(format(pattern, arguments));
+		}
+	}
+
+	/**
+	 * Formats and makes debug level log request.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null or malformed.
+	 * @param arguments may be null or mismatched.
+	 */
+	private static void logDebug(final Logger logger, final String pattern,
+			final Object[] arguments) {
+		if (pattern != null) {
+			logger.debug(format(pattern, arguments));
+		}
+	}
+
+	/**
+	 * Formats and makes info level log request.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null or malformed.
+	 * @param arguments may be null or mismatched.
+	 */
+	private static void logInfo(final Logger logger, final String pattern,
+			final Object[] arguments) {
+		if (pattern != null) {
+			logger.info(format(pattern, arguments));
+		}
+	}
+
+	/**
+	 * Formats and makes warn level log request.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null or malformed.
+	 * @param arguments may be null or mismatched.
+	 */
+	private static void logWarn(final Logger logger, final String pattern,
+			final Object[] arguments) {
+		if (pattern != null) {
+			logger.warn(format(pattern, arguments));
+		}
+	}
+
+	/**
+	 * Formats and makes error level log request.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null or malformed.
+	 * @param arguments may be null or mismatched.
+	 */
+	private static void logError(final Logger logger, final String pattern,
+			final Object[] arguments) {
+		if (pattern != null) {
+			logger.error(format(pattern, arguments));
+		}
+	}
+
+	/**
+	 * Formats and makes fatal level log request.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null or malformed.
+	 * @param arguments may be null or mismatched.
+	 */
+	private static void logFatal(final Logger logger, final String pattern,
+			final Object[] arguments) {
+		if (pattern != null) {
+			logger.fatal(format(pattern, arguments));
+		}
+	}
+
+	/**
+	 * Log a parameterized message at debug level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param arguments an array of arguments to be formatted and substituted.
+	 */
+	public static void trace(final Logger logger, final String pattern,
+			final Object... arguments) {
+		if (logger.isTraceEnabled()) {
+			logTrace(logger, pattern, arguments);
+		}
+	}
+
+	/**
+	 * Log a parameterized message at debug level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param arguments an array of arguments to be formatted and substituted.
+	 */
+	public static void debug(final Logger logger, final String pattern,
+			final Object... arguments) {
+		if (logger.isDebugEnabled()) {
+			logDebug(logger, pattern, arguments);
+		}
+	}
+
+	/**
+	 * Log a parameterized message at info level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param arguments an array of arguments to be formatted and substituted.
+	 */
+	public static void info(final Logger logger, final String pattern,
+			final Object... arguments) {
+		if (logger.isInfoEnabled()) {
+			logInfo(logger, pattern, arguments);
+		}
+	}
+
+	/**
+	 * Log a parameterized message at warn level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param arguments an array of arguments to be formatted and substituted.
+	 */
+	public static void warn(final Logger logger, final String pattern,
+			final Object... arguments) {
+		if (logger.isEnabledFor(Level.WARN)) {
+			logWarn(logger, pattern, arguments);
+		}
+	}
+
+	/**
+	 * Log a parameterized message at error level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param arguments an array of arguments to be formatted and substituted.
+	 */
+	public static void error(final Logger logger, final String pattern,
+			final Object... arguments) {
+		if (logger.isEnabledFor(Level.ERROR)) {
+			logError(logger, pattern, arguments);
+		}
+	}
+
+	/**
+	 * Log a parameterized message at fatal level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param arguments an array of arguments to be formatted and substituted.
+	 */
+	public static void fatal(final Logger logger, final String pattern,
+			final Object... arguments) {
+		if (logger.isEnabledFor(Level.FATAL)) {
+			logFatal(logger, pattern, arguments);
+		}
+	}
+
+	/**
+	 * Log a parameterized message at trace level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 */
+	public static void trace(final Logger logger, final String pattern) {
+		if (logger.isTraceEnabled()) {
+			logTrace(logger, pattern, NO_ARGS);
+		}
+	}
+
+	/**
+	 * Log a parameterized message at trace level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void trace(final Logger logger, final String pattern,
+			final boolean argument) {
+		if (logger.isTraceEnabled()) {
+			logTrace(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at trace level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void trace(final Logger logger, final String pattern,
+			final char argument) {
+		if (logger.isTraceEnabled()) {
+			logTrace(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at trace level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void trace(final Logger logger, final String pattern,
+			final byte argument) {
+		if (logger.isTraceEnabled()) {
+			logTrace(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at trace level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void trace(final Logger logger, final String pattern,
+			final short argument) {
+		if (logger.isTraceEnabled()) {
+			logTrace(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at trace level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void trace(final Logger logger, final String pattern,
+			final int argument) {
+		if (logger.isTraceEnabled()) {
+			logTrace(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at trace level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void trace(final Logger logger, final String pattern,
+			final long argument) {
+		if (logger.isTraceEnabled()) {
+			logTrace(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at trace level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void trace(final Logger logger, final String pattern,
+			final float argument) {
+		if (logger.isTraceEnabled()) {
+			logTrace(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at trace level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void trace(final Logger logger, final String pattern,
+			final double argument) {
+		if (logger.isTraceEnabled()) {
+			logTrace(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at trace level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void trace(final Logger logger, final String pattern,
+			final Object argument) {
+		if (logger.isTraceEnabled()) {
+			logTrace(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at trace level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param arg0 a value to be formatted and substituted.
+	 * @param arg1 a value to be formatted and substituted.
+	 */
+	public static void trace(final Logger logger, final String pattern,
+			final Object arg0, final Object arg1) {
+		if (logger.isTraceEnabled()) {
+			logTrace(logger, pattern, new Object[] { arg0, arg1 });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at trace level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param arg0 a value to be formatted and substituted.
+	 * @param arg1 a value to be formatted and substituted.
+	 * @param arg2 a value to be formatted and substituted.
+	 */
+	public static void trace(final Logger logger, final String pattern,
+			final Object arg0, final Object arg1, final Object arg2) {
+		if (logger.isDebugEnabled()) {
+			logTrace(logger, pattern, new Object[] { arg0, arg1, arg2 });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at debug level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 */
+	public static void debug(final Logger logger, final String pattern) {
+		if (logger.isDebugEnabled()) {
+			logDebug(logger, pattern, NO_ARGS);
+		}
+	}
+
+	/**
+	 * Log a parameterized message at debug level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void debug(final Logger logger, final String pattern,
+			final boolean argument) {
+		if (logger.isDebugEnabled()) {
+			logDebug(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at debug level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void debug(final Logger logger, final String pattern,
+			final char argument) {
+		if (logger.isDebugEnabled()) {
+			logDebug(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at debug level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void debug(final Logger logger, final String pattern,
+			final byte argument) {
+		if (logger.isDebugEnabled()) {
+			logDebug(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at debug level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void debug(final Logger logger, final String pattern,
+			final short argument) {
+		if (logger.isDebugEnabled()) {
+			logDebug(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at debug level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void debug(final Logger logger, final String pattern,
+			final int argument) {
+		if (logger.isDebugEnabled()) {
+			logDebug(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at debug level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void debug(final Logger logger, final String pattern,
+			final long argument) {
+		if (logger.isDebugEnabled()) {
+			logDebug(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at debug level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void debug(final Logger logger, final String pattern,
+			final float argument) {
+		if (logger.isDebugEnabled()) {
+			logDebug(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at debug level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void debug(final Logger logger, final String pattern,
+			final double argument) {
+		if (logger.isDebugEnabled()) {
+			logDebug(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at debug level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void debug(final Logger logger, final String pattern,
+			final Object argument) {
+		if (logger.isDebugEnabled()) {
+			logDebug(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at debug level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param arg0 a value to be formatted and substituted.
+	 * @param arg1 a value to be formatted and substituted.
+	 */
+	public static void debug(final Logger logger, final String pattern,
+			final Object arg0, final Object arg1) {
+		if (logger.isDebugEnabled()) {
+			logDebug(logger, pattern, new Object[] { arg0, arg1 });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at debug level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param arg0 a value to be formatted and substituted.
+	 * @param arg1 a value to be formatted and substituted.
+	 * @param arg2 a value to be formatted and substituted.
+	 */
+	public static void debug(final Logger logger, final String pattern,
+			final Object arg0, final Object arg1, final Object arg2) {
+		if (logger.isDebugEnabled()) {
+			logDebug(logger, pattern, new Object[] { arg0, arg1, arg2 });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at info level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 */
+	public static void info(final Logger logger, final String pattern) {
+		if (logger.isInfoEnabled()) {
+			logInfo(logger, pattern, NO_ARGS);
+		}
+	}
+
+	/**
+	 * Log a parameterized message at info level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void info(final Logger logger, final String pattern,
+			final boolean argument) {
+		if (logger.isInfoEnabled()) {
+			logInfo(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at info level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void info(final Logger logger, final String pattern,
+			final char argument) {
+		if (logger.isInfoEnabled()) {
+			logInfo(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at info level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void info(final Logger logger, final String pattern,
+			final byte argument) {
+		if (logger.isInfoEnabled()) {
+			logInfo(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at info level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void info(final Logger logger, final String pattern,
+			final short argument) {
+		if (logger.isInfoEnabled()) {
+			logInfo(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at info level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void info(final Logger logger, final String pattern,
+			final int argument) {
+		if (logger.isInfoEnabled()) {
+			logInfo(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at info level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void info(final Logger logger, final String pattern,
+			final long argument) {
+		if (logger.isInfoEnabled()) {
+			logInfo(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at info level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void info(final Logger logger, final String pattern,
+			final float argument) {
+		if (logger.isInfoEnabled()) {
+			logInfo(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at info level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void info(final Logger logger, final String pattern,
+			final double argument) {
+		if (logger.isInfoEnabled()) {
+			logInfo(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at info level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void info(final Logger logger, final String pattern,
+			final Object argument) {
+		if (logger.isInfoEnabled()) {
+			logInfo(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at info level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param arg0 a value to be formatted and substituted.
+	 * @param arg1 a value to be formatted and substituted.
+	 */
+	public static void info(final Logger logger, final String pattern,
+			final Object arg0, final Object arg1) {
+		if (logger.isInfoEnabled()) {
+			logInfo(logger, pattern, new Object[] { arg0, arg1 });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at info level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param arg0 a value to be formatted and substituted.
+	 * @param arg1 a value to be formatted and substituted.
+	 * @param arg2 a value to be formatted and substituted.
+	 */
+	public static void info(final Logger logger, final String pattern,
+			final Object arg0, final Object arg1, final Object arg2) {
+		if (logger.isInfoEnabled()) {
+			logInfo(logger, pattern, new Object[] { arg0, arg1, arg2 });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at warn level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 */
+	public static void warn(final Logger logger, final String pattern) {
+		if (logger.isEnabledFor(Level.WARN)) {
+			logWarn(logger, pattern, NO_ARGS);
+		}
+	}
+
+	/**
+	 * Log a parameterized message at warn level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void warn(final Logger logger, final String pattern,
+			final boolean argument) {
+		if (logger.isEnabledFor(Level.WARN)) {
+			logWarn(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at warn level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void warn(final Logger logger, final String pattern,
+			final char argument) {
+		if (logger.isEnabledFor(Level.WARN)) {
+			logWarn(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at warn level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void warn(final Logger logger, final String pattern,
+			final byte argument) {
+		if (logger.isEnabledFor(Level.WARN)) {
+			logWarn(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at warn level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void warn(final Logger logger, final String pattern,
+			final short argument) {
+		if (logger.isEnabledFor(Level.WARN)) {
+			logWarn(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at warn level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void warn(final Logger logger, final String pattern,
+			final int argument) {
+		if (logger.isEnabledFor(Level.WARN)) {
+			logWarn(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at warn level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void warn(final Logger logger, final String pattern,
+			final long argument) {
+		if (logger.isEnabledFor(Level.WARN)) {
+			logWarn(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at warn level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void warn(final Logger logger, final String pattern,
+			final float argument) {
+		if (logger.isEnabledFor(Level.WARN)) {
+			logWarn(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at warn level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void warn(final Logger logger, final String pattern,
+			final double argument) {
+		if (logger.isEnabledFor(Level.WARN)) {
+			logWarn(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at warn level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void warn(final Logger logger, final String pattern,
+			final Object argument) {
+		if (logger.isEnabledFor(Level.WARN)) {
+			logWarn(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at warn level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param arg0 a value to be formatted and substituted.
+	 * @param arg1 a value to be formatted and substituted.
+	 */
+	public static void warn(final Logger logger, final String pattern,
+			final Object arg0, final Object arg1) {
+		if (logger.isEnabledFor(Level.WARN)) {
+			logWarn(logger, pattern, new Object[] { arg0, arg1 });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at warn level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param arg0 a value to be formatted and substituted.
+	 * @param arg1 a value to be formatted and substituted.
+	 * @param arg2 a value to be formatted and substituted.
+	 */
+	public static void warn(final Logger logger, final String pattern,
+			final Object arg0, final Object arg1, final Object arg2) {
+		if (logger.isEnabledFor(Level.WARN)) {
+			logWarn(logger, pattern, new Object[] { arg0, arg1, arg2 });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at error level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 */
+	public static void error(final Logger logger, final String pattern) {
+		if (logger.isEnabledFor(Level.ERROR)) {
+			logError(logger, pattern, NO_ARGS);
+		}
+	}
+
+	/**
+	 * Log a parameterized message at error level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void error(final Logger logger, final String pattern,
+			final boolean argument) {
+		if (logger.isEnabledFor(Level.ERROR)) {
+			logError(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at error level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void error(final Logger logger, final String pattern,
+			final char argument) {
+		if (logger.isEnabledFor(Level.ERROR)) {
+			logError(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at error level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void error(final Logger logger, final String pattern,
+			final byte argument) {
+		if (logger.isEnabledFor(Level.ERROR)) {
+			logError(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at error level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void error(final Logger logger, final String pattern,
+			final short argument) {
+		if (logger.isEnabledFor(Level.ERROR)) {
+			logError(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at error level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void error(final Logger logger, final String pattern,
+			final int argument) {
+		if (logger.isEnabledFor(Level.ERROR)) {
+			logError(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at error level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void error(final Logger logger, final String pattern,
+			final long argument) {
+		if (logger.isEnabledFor(Level.ERROR)) {
+			logError(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at error level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void error(final Logger logger, final String pattern,
+			final float argument) {
+		if (logger.isEnabledFor(Level.ERROR)) {
+			logError(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at error level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void error(final Logger logger, final String pattern,
+			final double argument) {
+		if (logger.isEnabledFor(Level.ERROR)) {
+			logError(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at error level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void error(final Logger logger, final String pattern,
+			final Object argument) {
+		if (logger.isEnabledFor(Level.ERROR)) {
+			logError(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at error level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param arg0 a value to be formatted and substituted.
+	 * @param arg1 a value to be formatted and substituted.
+	 */
+	public static void error(final Logger logger, final String pattern,
+			final Object arg0, final Object arg1) {
+		if (logger.isEnabledFor(Level.ERROR)) {
+			logError(logger, pattern, new Object[] { arg0, arg1 });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at error level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param arg0 a value to be formatted and substituted.
+	 * @param arg1 a value to be formatted and substituted.
+	 * @param arg2 a value to be formatted and substituted.
+	 */
+	public static void error(final Logger logger, final String pattern,
+			final Object arg0, final Object arg1, final Object arg2) {
+		if (logger.isEnabledFor(Level.ERROR)) {
+			logError(logger, pattern, new Object[] { arg0, arg1, arg2 });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at fatal level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 */
+	public static void fatal(final Logger logger, final String pattern) {
+		if (logger.isEnabledFor(Level.FATAL)) {
+			logFatal(logger, pattern, NO_ARGS);
+		}
+	}
+
+	/**
+	 * Log a parameterized message at fatal level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void fatal(final Logger logger, final String pattern,
+			final boolean argument) {
+		if (logger.isEnabledFor(Level.FATAL)) {
+			logFatal(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at fatal level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void fatal(final Logger logger, final String pattern,
+			final char argument) {
+		if (logger.isEnabledFor(Level.FATAL)) {
+			logFatal(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at fatal level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void fatal(final Logger logger, final String pattern,
+			final byte argument) {
+		if (logger.isEnabledFor(Level.FATAL)) {
+			logFatal(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at fatal level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void fatal(final Logger logger, final String pattern,
+			final short argument) {
+		if (logger.isEnabledFor(Level.FATAL)) {
+			logFatal(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at fatal level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void fatal(final Logger logger, final String pattern,
+			final int argument) {
+		if (logger.isEnabledFor(Level.FATAL)) {
+			logFatal(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at fatal level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void fatal(final Logger logger, final String pattern,
+			final long argument) {
+		if (logger.isEnabledFor(Level.FATAL)) {
+			logFatal(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at fatal level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void fatal(final Logger logger, final String pattern,
+			final float argument) {
+		if (logger.isEnabledFor(Level.FATAL)) {
+			logFatal(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at fatal level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void fatal(final Logger logger, final String pattern,
+			final double argument) {
+		if (logger.isEnabledFor(Level.FATAL)) {
+			logFatal(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at fatal level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param argument a value to be formatted and substituted.
+	 */
+	public static void fatal(final Logger logger, final String pattern,
+			final Object argument) {
+		if (logger.isEnabledFor(Level.FATAL)) {
+			logFatal(logger, pattern, new Object[] { argument });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at fatal level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param arg0 a value to be formatted and substituted.
+	 * @param arg1 a value to be formatted and substituted.
+	 */
+	public static void fatal(final Logger logger, final String pattern,
+			final Object arg0, final Object arg1) {
+		if (logger.isEnabledFor(Level.FATAL)) {
+			logFatal(logger, pattern, new Object[] { arg0, arg1 });
+		}
+	}
+
+	/**
+	 * Log a parameterized message at fatal level.
+	 * @param logger logger, may not be null.
+	 * @param pattern pattern, may be null.
+	 * @param arg0 a value to be formatted and substituted.
+	 * @param arg1 a value to be formatted and substituted.
+	 * @param arg2 a value to be formatted and substituted.
+	 */
+	public static void fatal(final Logger logger, final String pattern,
+			final Object arg0, final Object arg1, final Object arg2) {
+		if (logger.isEnabledFor(Level.FATAL)) {
+			logFatal(logger, pattern, new Object[] { arg0, arg1, arg2 });
+		}
+	}
+
+}

Propchange: logging/sandbox/log4j/formatter/src/main/java/org/apache/log4j/formatter/LogF.java
------------------------------------------------------------------------------
    svn:executable = 



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org