[jboss-svn-commits] JBoss Common SVN: r4236 - in jboss-logging/trunk/src/main/java/org/jboss/logging: annotation and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Apr 8 21:08:06 EDT 2010


Author: david.lloyd at jboss.com
Date: 2010-04-08 21:08:05 -0400 (Thu, 08 Apr 2010)
New Revision: 4236

Added:
   jboss-logging/trunk/src/main/java/org/jboss/logging/BasicLogger.java
   jboss-logging/trunk/src/main/java/org/jboss/logging/ParameterConverter.java
   jboss-logging/trunk/src/main/java/org/jboss/logging/annotation/
   jboss-logging/trunk/src/main/java/org/jboss/logging/annotation/LogMessage.java
   jboss-logging/trunk/src/main/java/org/jboss/logging/annotation/Message.java
   jboss-logging/trunk/src/main/java/org/jboss/logging/annotation/MessageBundle.java
   jboss-logging/trunk/src/main/java/org/jboss/logging/annotation/MessageLogger.java
   jboss-logging/trunk/src/main/java/org/jboss/logging/annotation/Translation.java
   jboss-logging/trunk/src/main/java/org/jboss/logging/annotation/Translations.java
Modified:
   jboss-logging/trunk/src/main/java/org/jboss/logging/Logger.java
   jboss-logging/trunk/src/main/java/org/jboss/logging/SerializedLogger.java
Log:
Initial impl of the new i18n/l7n stuff

Added: jboss-logging/trunk/src/main/java/org/jboss/logging/BasicLogger.java
===================================================================
--- jboss-logging/trunk/src/main/java/org/jboss/logging/BasicLogger.java	                        (rev 0)
+++ jboss-logging/trunk/src/main/java/org/jboss/logging/BasicLogger.java	2010-04-09 01:08:05 UTC (rev 4236)
@@ -0,0 +1,1537 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.logging;
+
+/**
+ * An interface which specifies the basic logger methods.  When used as the base interface of a typed logger, these methods will delegate
+ * to the corresponding underlying logger instance.
+ *
+ * @author <a href="mailto:david.lloyd at redhat.com">David M. Lloyd</a>
+ */
+public interface BasicLogger {
+
+    /**
+     * Check to see if the given level is enabled for this logger.
+     *
+     * @param level the level to check for
+     * @return {@code true} if messages may be logged at the given level, {@code false} otherwise
+     */
+    boolean isEnabled(Logger.Level level);
+
+    /**
+     * Check to see if the {@code TRACE} level is enabled for this logger.
+     *
+     * @return {@code true} if messages logged at {@link org.jboss.logging.Logger.Level#TRACE} may be accepted, {@code false} otherwise
+     */
+    boolean isTraceEnabled();
+
+    /**
+     * Issue a log message with a level of TRACE.
+     *
+     * @param message the message
+     */
+    void trace(Object message);
+
+    /**
+     * Issue a log message and throwable with a level of TRACE.
+     *
+     * @param message the message
+     * @param t the throwable
+     */
+    void trace(Object message, Throwable t);
+
+    /**
+     * Issue a log message and throwable with a level of TRACE and a specific logger class name.
+     *
+     * @param loggerFqcn the logger class name
+     * @param message the message
+     * @param t the throwable
+     */
+    void trace(String loggerFqcn, Object message, Throwable t);
+
+    /**
+     * Issue a log message with parameters with a level of TRACE.
+     *
+     * @param message the message
+     * @param params the message parameters
+     * @deprecated To log a message with parameters, using {@link #tracev(String, Object...)} is recommended.
+     */
+    void trace(Object message, Object[] params);
+
+    /**
+     * Issue a log message with parameters and a throwable with a level of TRACE.
+     *
+     * @param message the message
+     * @param params the message parameters
+     * @param t the throwable
+     * @deprecated To log a message with parameters, using {@link #tracev(Throwable, String, Object...)} is recommended.
+     */
+    void trace(Object message, Object[] params, Throwable t);
+
+    /**
+     * Issue a log message with parameters and a throwable with a level of TRACE.
+     *
+     * @param loggerFqcn the logger class name
+     * @param message the message
+     * @param params the message parameters
+     * @param t the throwable
+     */
+    void trace(String loggerFqcn, Object message, Object[] params, Throwable t);
+
+    /**
+     * Issue a log message with a level of TRACE using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param format the message format string
+     * @param params the parameters
+     */
+    void tracev(String format, Object... params);
+
+    /**
+     * Issue a log message with a level of TRACE using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param format the message format string
+     * @param param1 the sole parameter
+     */
+    void tracev(String format, Object param1);
+
+    /**
+     * Issue a log message with a level of TRACE using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param format the message format string
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     */
+    void tracev(String format, Object param1, Object param2);
+
+    /**
+     * Issue a log message with a level of TRACE using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param format the message format string
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     * @param param3 the third parameter
+     */
+    void tracev(String format, Object param1, Object param2, Object param3);
+
+    /**
+     * Issue a log message with a level of TRACE using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param t the throwable
+     * @param format the message format string
+     * @param params the parameters
+     */
+    void tracev(Throwable t, String format, Object... params);
+
+    /**
+     * Issue a log message with a level of TRACE using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param t the throwable
+     * @param format the message format string
+     * @param param1 the sole parameter
+     */
+    void tracev(Throwable t, String format, Object param1);
+
+    /**
+     * Issue a log message with a level of TRACE using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param t the throwable
+     * @param format the message format string
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     */
+    void tracev(Throwable t, String format, Object param1, Object param2);
+
+    /**
+     * Issue a log message with a level of TRACE using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param t the throwable
+     * @param format the message format string
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     * @param param3 the third parameter
+     */
+    void tracev(Throwable t, String format, Object param1, Object param2, Object param3);
+
+    /**
+     * Issue a formatted log message with a level of TRACE.
+     *
+     * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
+     * @param params the parameters
+     */
+    void tracef(String format, Object... params);
+
+    /**
+     * Issue a formatted log message with a level of TRACE.
+     *
+     * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
+     * @param param1 the sole parameter
+     */
+    void tracef(String format, Object param1);
+
+    /**
+     * Issue a formatted log message with a level of TRACE.
+     *
+     * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     */
+    void tracef(String format, Object param1, Object param2);
+
+    /**
+     * Issue a formatted log message with a level of TRACE.
+     *
+     * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     * @param param3 the third parameter
+     */
+    void tracef(String format, Object param1, Object param2, Object param3);
+
+    /**
+     * Issue a formatted log message with a level of TRACE.
+     *
+     * @param t the throwable
+     * @param format the format string, as per {@link String#format(String, Object...)}
+     * @param params the parameters
+     */
+    void tracef(Throwable t, String format, Object... params);
+
+    /**
+     * Issue a formatted log message with a level of TRACE.
+     *
+     * @param t the throwable
+     * @param format the format string, as per {@link String#format(String, Object...)}
+     * @param param1 the sole parameter
+     */
+    void tracef(Throwable t, String format, Object param1);
+
+    /**
+     * Issue a formatted log message with a level of TRACE.
+     *
+     * @param t the throwable
+     * @param format the format string, as per {@link String#format(String, Object...)}
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     */
+    void tracef(Throwable t, String format, Object param1, Object param2);
+
+    /**
+     * Issue a formatted log message with a level of TRACE.
+     *
+     * @param t the throwable
+     * @param format the format string, as per {@link String#format(String, Object...)}
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     * @param param3 the third parameter
+     */
+    void tracef(Throwable t, String format, Object param1, Object param2, Object param3);
+
+    /**
+     * Check to see if the {@code DEBUG} level is enabled for this logger.
+     *
+     * @return {@code true} if messages logged at {@link org.jboss.logging.Logger.Level#DEBUG} may be accepted, {@code false} otherwise
+     */
+    boolean isDebugEnabled();
+
+    /**
+     * Issue a log message with a level of DEBUG.
+     *
+     * @param message the message
+     */
+    void debug(Object message);
+
+    /**
+     * Issue a log message and throwable with a level of DEBUG.
+     *
+     * @param message the message
+     * @param t the throwable
+     */
+    void debug(Object message, Throwable t);
+
+    /**
+     * Issue a log message and throwable with a level of DEBUG and a specific logger class name.
+     *
+     * @param loggerFqcn the logger class name
+     * @param message the message
+     * @param t the throwable
+     */
+    void debug(String loggerFqcn, Object message, Throwable t);
+
+    /**
+     * Issue a log message with parameters with a level of DEBUG.
+     *
+     * @param message the message
+     * @param params the message parameters
+     * @deprecated To log a message with parameters, using {@link #debugv(String, Object...)} is recommended.
+     */
+    void debug(Object message, Object[] params);
+
+    /**
+     * Issue a log message with parameters and a throwable with a level of DEBUG.
+     *
+     * @param message the message
+     * @param params the message parameters
+     * @param t the throwable
+     * @deprecated To log a message with parameters, using {@link #debugv(Throwable, String, Object...)} is recommended.
+     */
+    void debug(Object message, Object[] params, Throwable t);
+
+    /**
+     * Issue a log message with parameters and a throwable with a level of DEBUG.
+     *
+     * @param loggerFqcn the logger class name
+     * @param message the message
+     * @param params the message parameters
+     * @param t the throwable
+     */
+    void debug(String loggerFqcn, Object message, Object[] params, Throwable t);
+
+    /**
+     * Issue a log message with a level of DEBUG using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param format the message format string
+     * @param params the parameters
+     */
+    void debugv(String format, Object... params);
+
+    /**
+     * Issue a log message with a level of DEBUG using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param format the message format string
+     * @param param1 the sole parameter
+     */
+    void debugv(String format, Object param1);
+
+    /**
+     * Issue a log message with a level of DEBUG using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param format the message format string
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     */
+    void debugv(String format, Object param1, Object param2);
+
+    /**
+     * Issue a log message with a level of DEBUG using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param format the message format string
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     * @param param3 the third parameter
+     */
+    void debugv(String format, Object param1, Object param2, Object param3);
+
+    /**
+     * Issue a log message with a level of DEBUG using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param t the throwable
+     * @param format the message format string
+     * @param params the parameters
+     */
+    void debugv(Throwable t, String format, Object... params);
+
+    /**
+     * Issue a log message with a level of DEBUG using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param t the throwable
+     * @param format the message format string
+     * @param param1 the sole parameter
+     */
+    void debugv(Throwable t, String format, Object param1);
+
+    /**
+     * Issue a log message with a level of DEBUG using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param t the throwable
+     * @param format the message format string
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     */
+    void debugv(Throwable t, String format, Object param1, Object param2);
+
+    /**
+     * Issue a log message with a level of DEBUG using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param t the throwable
+     * @param format the message format string
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     * @param param3 the third parameter
+     */
+    void debugv(Throwable t, String format, Object param1, Object param2, Object param3);
+
+    /**
+     * Issue a formatted log message with a level of DEBUG.
+     *
+     * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
+     * @param params the parameters
+     */
+    void debugf(String format, Object... params);
+
+    /**
+     * Issue a formatted log message with a level of DEBUG.
+     *
+     * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
+     * @param param1 the sole parameter
+     */
+    void debugf(String format, Object param1);
+
+    /**
+     * Issue a formatted log message with a level of DEBUG.
+     *
+     * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     */
+    void debugf(String format, Object param1, Object param2);
+
+    /**
+     * Issue a formatted log message with a level of DEBUG.
+     *
+     * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     * @param param3 the third parameter
+     */
+    void debugf(String format, Object param1, Object param2, Object param3);
+
+    /**
+     * Issue a formatted log message with a level of DEBUG.
+     *
+     * @param t the throwable
+     * @param format the format string, as per {@link String#format(String, Object...)}
+     * @param params the parameters
+     */
+    void debugf(Throwable t, String format, Object... params);
+
+    /**
+     * Issue a formatted log message with a level of DEBUG.
+     *
+     * @param t the throwable
+     * @param format the format string, as per {@link String#format(String, Object...)}
+     * @param param1 the sole parameter
+     */
+    void debugf(Throwable t, String format, Object param1);
+
+    /**
+     * Issue a formatted log message with a level of DEBUG.
+     *
+     * @param t the throwable
+     * @param format the format string, as per {@link String#format(String, Object...)}
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     */
+    void debugf(Throwable t, String format, Object param1, Object param2);
+
+    /**
+     * Issue a formatted log message with a level of DEBUG.
+     *
+     * @param t the throwable
+     * @param format the format string, as per {@link String#format(String, Object...)}
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     * @param param3 the third parameter
+     */
+    void debugf(Throwable t, String format, Object param1, Object param2, Object param3);
+
+    /**
+     * Check to see if the {@code INFO} level is enabled for this logger.
+     *
+     * @return {@code true} if messages logged at {@link org.jboss.logging.Logger.Level#INFO} may be accepted, {@code false} otherwise
+     */
+    boolean isInfoEnabled();
+
+    /**
+     * Issue a log message with a level of INFO.
+     *
+     * @param message the message
+     */
+    void info(Object message);
+
+    /**
+     * Issue a log message and throwable with a level of INFO.
+     *
+     * @param message the message
+     * @param t the throwable
+     */
+    void info(Object message, Throwable t);
+
+    /**
+     * Issue a log message and throwable with a level of INFO and a specific logger class name.
+     *
+     * @param loggerFqcn the logger class name
+     * @param message the message
+     * @param t the throwable
+     */
+    void info(String loggerFqcn, Object message, Throwable t);
+
+    /**
+     * Issue a log message with parameters with a level of INFO.
+     *
+     * @param message the message
+     * @param params the message parameters
+     * @deprecated To log a message with parameters, using {@link #infov(String, Object...)} is recommended.
+     */
+    void info(Object message, Object[] params);
+
+    /**
+     * Issue a log message with parameters and a throwable with a level of INFO.
+     *
+     * @param message the message
+     * @param params the message parameters
+     * @param t the throwable
+     * @deprecated To log a message with parameters, using {@link #infov(Throwable, String, Object...)} is recommended.
+     */
+    void info(Object message, Object[] params, Throwable t);
+
+    /**
+     * Issue a log message with parameters and a throwable with a level of INFO.
+     *
+     * @param loggerFqcn the logger class name
+     * @param message the message
+     * @param params the message parameters
+     * @param t the throwable
+     */
+    void info(String loggerFqcn, Object message, Object[] params, Throwable t);
+
+    /**
+     * Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param format the message format string
+     * @param params the parameters
+     */
+    void infov(String format, Object... params);
+
+    /**
+     * Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param format the message format string
+     * @param param1 the sole parameter
+     */
+    void infov(String format, Object param1);
+
+    /**
+     * Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param format the message format string
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     */
+    void infov(String format, Object param1, Object param2);
+
+    /**
+     * Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param format the message format string
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     * @param param3 the third parameter
+     */
+    void infov(String format, Object param1, Object param2, Object param3);
+
+    /**
+     * Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param t the throwable
+     * @param format the message format string
+     * @param params the parameters
+     */
+    void infov(Throwable t, String format, Object... params);
+
+    /**
+     * Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param t the throwable
+     * @param format the message format string
+     * @param param1 the sole parameter
+     */
+    void infov(Throwable t, String format, Object param1);
+
+    /**
+     * Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param t the throwable
+     * @param format the message format string
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     */
+    void infov(Throwable t, String format, Object param1, Object param2);
+
+    /**
+     * Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param t the throwable
+     * @param format the message format string
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     * @param param3 the third parameter
+     */
+    void infov(Throwable t, String format, Object param1, Object param2, Object param3);
+
+    /**
+     * Issue a formatted log message with a level of INFO.
+     *
+     * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
+     * @param params the parameters
+     */
+    void infof(String format, Object... params);
+
+    /**
+     * Issue a formatted log message with a level of INFO.
+     *
+     * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
+     * @param param1 the sole parameter
+     */
+    void infof(String format, Object param1);
+
+    /**
+     * Issue a formatted log message with a level of INFO.
+     *
+     * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     */
+    void infof(String format, Object param1, Object param2);
+
+    /**
+     * Issue a formatted log message with a level of INFO.
+     *
+     * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     * @param param3 the third parameter
+     */
+    void infof(String format, Object param1, Object param2, Object param3);
+
+    /**
+     * Issue a formatted log message with a level of INFO.
+     *
+     * @param t the throwable
+     * @param format the format string, as per {@link String#format(String, Object...)}
+     * @param params the parameters
+     */
+    void infof(Throwable t, String format, Object... params);
+
+    /**
+     * Issue a formatted log message with a level of INFO.
+     *
+     * @param t the throwable
+     * @param format the format string, as per {@link String#format(String, Object...)}
+     * @param param1 the sole parameter
+     */
+    void infof(Throwable t, String format, Object param1);
+
+    /**
+     * Issue a formatted log message with a level of INFO.
+     *
+     * @param t the throwable
+     * @param format the format string, as per {@link String#format(String, Object...)}
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     */
+    void infof(Throwable t, String format, Object param1, Object param2);
+
+    /**
+     * Issue a formatted log message with a level of INFO.
+     *
+     * @param t the throwable
+     * @param format the format string, as per {@link String#format(String, Object...)}
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     * @param param3 the third parameter
+     */
+    void infof(Throwable t, String format, Object param1, Object param2, Object param3);
+
+    /**
+     * Issue a log message with a level of WARN.
+     *
+     * @param message the message
+     */
+    void warn(Object message);
+
+    /**
+     * Issue a log message and throwable with a level of WARN.
+     *
+     * @param message the message
+     * @param t the throwable
+     */
+    void warn(Object message, Throwable t);
+
+    /**
+     * Issue a log message and throwable with a level of WARN and a specific logger class name.
+     *
+     * @param loggerFqcn the logger class name
+     * @param message the message
+     * @param t the throwable
+     */
+    void warn(String loggerFqcn, Object message, Throwable t);
+
+    /**
+     * Issue a log message with parameters with a level of WARN.
+     *
+     * @param message the message
+     * @param params the message parameters
+     * @deprecated To log a message with parameters, using {@link #warnv(String, Object...)} is recommended.
+     */
+    void warn(Object message, Object[] params);
+
+    /**
+     * Issue a log message with parameters and a throwable with a level of WARN.
+     *
+     * @param message the message
+     * @param params the message parameters
+     * @param t the throwable
+     * @deprecated To log a message with parameters, using {@link #warnv(Throwable, String, Object...)} is recommended.
+     */
+    void warn(Object message, Object[] params, Throwable t);
+
+    /**
+     * Issue a log message with parameters and a throwable with a level of WARN.
+     *
+     * @param loggerFqcn the logger class name
+     * @param message the message
+     * @param params the message parameters
+     * @param t the throwable
+     */
+    void warn(String loggerFqcn, Object message, Object[] params, Throwable t);
+
+    /**
+     * Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param format the message format string
+     * @param params the parameters
+     */
+    void warnv(String format, Object... params);
+
+    /**
+     * Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param format the message format string
+     * @param param1 the sole parameter
+     */
+    void warnv(String format, Object param1);
+
+    /**
+     * Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param format the message format string
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     */
+    void warnv(String format, Object param1, Object param2);
+
+    /**
+     * Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param format the message format string
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     * @param param3 the third parameter
+     */
+    void warnv(String format, Object param1, Object param2, Object param3);
+
+    /**
+     * Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param t the throwable
+     * @param format the message format string
+     * @param params the parameters
+     */
+    void warnv(Throwable t, String format, Object... params);
+
+    /**
+     * Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param t the throwable
+     * @param format the message format string
+     * @param param1 the sole parameter
+     */
+    void warnv(Throwable t, String format, Object param1);
+
+    /**
+     * Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param t the throwable
+     * @param format the message format string
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     */
+    void warnv(Throwable t, String format, Object param1, Object param2);
+
+    /**
+     * Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param t the throwable
+     * @param format the message format string
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     * @param param3 the third parameter
+     */
+    void warnv(Throwable t, String format, Object param1, Object param2, Object param3);
+
+    /**
+     * Issue a formatted log message with a level of WARN.
+     *
+     * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
+     * @param params the parameters
+     */
+    void warnf(String format, Object... params);
+
+    /**
+     * Issue a formatted log message with a level of WARN.
+     *
+     * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
+     * @param param1 the sole parameter
+     */
+    void warnf(String format, Object param1);
+
+    /**
+     * Issue a formatted log message with a level of WARN.
+     *
+     * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     */
+    void warnf(String format, Object param1, Object param2);
+
+    /**
+     * Issue a formatted log message with a level of WARN.
+     *
+     * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     * @param param3 the third parameter
+     */
+    void warnf(String format, Object param1, Object param2, Object param3);
+
+    /**
+     * Issue a formatted log message with a level of WARN.
+     *
+     * @param t the throwable
+     * @param format the format string, as per {@link String#format(String, Object...)}
+     * @param params the parameters
+     */
+    void warnf(Throwable t, String format, Object... params);
+
+    /**
+     * Issue a formatted log message with a level of WARN.
+     *
+     * @param t the throwable
+     * @param format the format string, as per {@link String#format(String, Object...)}
+     * @param param1 the sole parameter
+     */
+    void warnf(Throwable t, String format, Object param1);
+
+    /**
+     * Issue a formatted log message with a level of WARN.
+     *
+     * @param t the throwable
+     * @param format the format string, as per {@link String#format(String, Object...)}
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     */
+    void warnf(Throwable t, String format, Object param1, Object param2);
+
+    /**
+     * Issue a formatted log message with a level of WARN.
+     *
+     * @param t the throwable
+     * @param format the format string, as per {@link String#format(String, Object...)}
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     * @param param3 the third parameter
+     */
+    void warnf(Throwable t, String format, Object param1, Object param2, Object param3);
+
+    /**
+     * Issue a log message with a level of ERROR.
+     *
+     * @param message the message
+     */
+    void error(Object message);
+
+    /**
+     * Issue a log message and throwable with a level of ERROR.
+     *
+     * @param message the message
+     * @param t the throwable
+     */
+    void error(Object message, Throwable t);
+
+    /**
+     * Issue a log message and throwable with a level of ERROR and a specific logger class name.
+     *
+     * @param loggerFqcn the logger class name
+     * @param message the message
+     * @param t the throwable
+     */
+    void error(String loggerFqcn, Object message, Throwable t);
+
+    /**
+     * Issue a log message with parameters with a level of ERROR.
+     *
+     * @param message the message
+     * @param params the message parameters
+     * @deprecated To log a message with parameters, using {@link #errorv(String, Object...)} is recommended.
+     */
+    void error(Object message, Object[] params);
+
+    /**
+     * Issue a log message with parameters and a throwable with a level of ERROR.
+     *
+     * @param message the message
+     * @param params the message parameters
+     * @param t the throwable
+     * @deprecated To log a message with parameters, using {@link #errorv(Throwable, String, Object...)} is recommended.
+     */
+    void error(Object message, Object[] params, Throwable t);
+
+    /**
+     * Issue a log message with parameters and a throwable with a level of ERROR.
+     *
+     * @param loggerFqcn the logger class name
+     * @param message the message
+     * @param params the message parameters
+     * @param t the throwable
+     */
+    void error(String loggerFqcn, Object message, Object[] params, Throwable t);
+
+    /**
+     * Issue a log message with a level of ERROR using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param format the message format string
+     * @param params the parameters
+     */
+    void errorv(String format, Object... params);
+
+    /**
+     * Issue a log message with a level of ERROR using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param format the message format string
+     * @param param1 the sole parameter
+     */
+    void errorv(String format, Object param1);
+
+    /**
+     * Issue a log message with a level of ERROR using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param format the message format string
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     */
+    void errorv(String format, Object param1, Object param2);
+
+    /**
+     * Issue a log message with a level of ERROR using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param format the message format string
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     * @param param3 the third parameter
+     */
+    void errorv(String format, Object param1, Object param2, Object param3);
+
+    /**
+     * Issue a log message with a level of ERROR using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param t the throwable
+     * @param format the message format string
+     * @param params the parameters
+     */
+    void errorv(Throwable t, String format, Object... params);
+
+    /**
+     * Issue a log message with a level of ERROR using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param t the throwable
+     * @param format the message format string
+     * @param param1 the sole parameter
+     */
+    void errorv(Throwable t, String format, Object param1);
+
+    /**
+     * Issue a log message with a level of ERROR using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param t the throwable
+     * @param format the message format string
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     */
+    void errorv(Throwable t, String format, Object param1, Object param2);
+
+    /**
+     * Issue a log message with a level of ERROR using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param t the throwable
+     * @param format the message format string
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     * @param param3 the third parameter
+     */
+    void errorv(Throwable t, String format, Object param1, Object param2, Object param3);
+
+    /**
+     * Issue a formatted log message with a level of ERROR.
+     *
+     * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
+     * @param params the parameters
+     */
+    void errorf(String format, Object... params);
+
+    /**
+     * Issue a formatted log message with a level of ERROR.
+     *
+     * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
+     * @param param1 the sole parameter
+     */
+    void errorf(String format, Object param1);
+
+    /**
+     * Issue a formatted log message with a level of ERROR.
+     *
+     * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     */
+    void errorf(String format, Object param1, Object param2);
+
+    /**
+     * Issue a formatted log message with a level of ERROR.
+     *
+     * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     * @param param3 the third parameter
+     */
+    void errorf(String format, Object param1, Object param2, Object param3);
+
+    /**
+     * Issue a formatted log message with a level of ERROR.
+     *
+     * @param t the throwable
+     * @param format the format string, as per {@link String#format(String, Object...)}
+     * @param params the parameters
+     */
+    void errorf(Throwable t, String format, Object... params);
+
+    /**
+     * Issue a formatted log message with a level of ERROR.
+     *
+     * @param t the throwable
+     * @param format the format string, as per {@link String#format(String, Object...)}
+     * @param param1 the sole parameter
+     */
+    void errorf(Throwable t, String format, Object param1);
+
+    /**
+     * Issue a formatted log message with a level of ERROR.
+     *
+     * @param t the throwable
+     * @param format the format string, as per {@link String#format(String, Object...)}
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     */
+    void errorf(Throwable t, String format, Object param1, Object param2);
+
+    /**
+     * Issue a formatted log message with a level of ERROR.
+     *
+     * @param t the throwable
+     * @param format the format string, as per {@link String#format(String, Object...)}
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     * @param param3 the third parameter
+     */
+    void errorf(Throwable t, String format, Object param1, Object param2, Object param3);
+
+    /**
+     * Issue a log message with a level of FATAL.
+     *
+     * @param message the message
+     */
+    void fatal(Object message);
+
+    /**
+     * Issue a log message and throwable with a level of FATAL.
+     *
+     * @param message the message
+     * @param t the throwable
+     */
+    void fatal(Object message, Throwable t);
+
+    /**
+     * Issue a log message and throwable with a level of FATAL and a specific logger class name.
+     *
+     * @param loggerFqcn the logger class name
+     * @param message the message
+     * @param t the throwable
+     */
+    void fatal(String loggerFqcn, Object message, Throwable t);
+
+    /**
+     * Issue a log message with parameters with a level of FATAL.
+     *
+     * @param message the message
+     * @param params the message parameters
+     * @deprecated To log a message with parameters, using {@link #fatalv(String, Object...)} is recommended.
+     */
+    void fatal(Object message, Object[] params);
+
+    /**
+     * Issue a log message with parameters and a throwable with a level of FATAL.
+     *
+     * @param message the message
+     * @param params the message parameters
+     * @param t the throwable
+     * @deprecated To log a message with parameters, using {@link #fatalv(Throwable, String, Object...)} is recommended.
+     */
+    void fatal(Object message, Object[] params, Throwable t);
+
+    /**
+     * Issue a log message with parameters and a throwable with a level of FATAL.
+     *
+     * @param loggerFqcn the logger class name
+     * @param message the message
+     * @param params the message parameters
+     * @param t the throwable
+     */
+    void fatal(String loggerFqcn, Object message, Object[] params, Throwable t);
+
+    /**
+     * Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param format the message format string
+     * @param params the parameters
+     */
+    void fatalv(String format, Object... params);
+
+    /**
+     * Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param format the message format string
+     * @param param1 the sole parameter
+     */
+    void fatalv(String format, Object param1);
+
+    /**
+     * Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param format the message format string
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     */
+    void fatalv(String format, Object param1, Object param2);
+
+    /**
+     * Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param format the message format string
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     * @param param3 the third parameter
+     */
+    void fatalv(String format, Object param1, Object param2, Object param3);
+
+    /**
+     * Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param t the throwable
+     * @param format the message format string
+     * @param params the parameters
+     */
+    void fatalv(Throwable t, String format, Object... params);
+
+    /**
+     * Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param t the throwable
+     * @param format the message format string
+     * @param param1 the sole parameter
+     */
+    void fatalv(Throwable t, String format, Object param1);
+
+    /**
+     * Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param t the throwable
+     * @param format the message format string
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     */
+    void fatalv(Throwable t, String format, Object param1, Object param2);
+
+    /**
+     * Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param t the throwable
+     * @param format the message format string
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     * @param param3 the third parameter
+     */
+    void fatalv(Throwable t, String format, Object param1, Object param2, Object param3);
+
+    /**
+     * Issue a formatted log message with a level of FATAL.
+     *
+     * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
+     * @param params the parameters
+     */
+    void fatalf(String format, Object... params);
+
+    /**
+     * Issue a formatted log message with a level of FATAL.
+     *
+     * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
+     * @param param1 the sole parameter
+     */
+    void fatalf(String format, Object param1);
+
+    /**
+     * Issue a formatted log message with a level of FATAL.
+     *
+     * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     */
+    void fatalf(String format, Object param1, Object param2);
+
+    /**
+     * Issue a formatted log message with a level of FATAL.
+     *
+     * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     * @param param3 the third parameter
+     */
+    void fatalf(String format, Object param1, Object param2, Object param3);
+
+    /**
+     * Issue a formatted log message with a level of FATAL.
+     *
+     * @param t the throwable
+     * @param format the format string, as per {@link String#format(String, Object...)}
+     * @param params the parameters
+     */
+    void fatalf(Throwable t, String format, Object... params);
+
+    /**
+     * Issue a formatted log message with a level of FATAL.
+     *
+     * @param t the throwable
+     * @param format the format string, as per {@link String#format(String, Object...)}
+     * @param param1 the sole parameter
+     */
+    void fatalf(Throwable t, String format, Object param1);
+
+    /**
+     * Issue a formatted log message with a level of FATAL.
+     *
+     * @param t the throwable
+     * @param format the format string, as per {@link String#format(String, Object...)}
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     */
+    void fatalf(Throwable t, String format, Object param1, Object param2);
+
+    /**
+     * Issue a formatted log message with a level of FATAL.
+     *
+     * @param t the throwable
+     * @param format the format string, as per {@link String#format(String, Object...)}
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     * @param param3 the third parameter
+     */
+    void fatalf(Throwable t, String format, Object param1, Object param2, Object param3);
+
+    /**
+     * Log a message at the given level.
+     *
+     * @param level the level
+     * @param message the message
+     */
+    void log(Logger.Level level, Object message);
+
+    /**
+     * Issue a log message and throwable at the given log level.
+     *
+     * @param level the level
+     * @param message the message
+     * @param t the throwable
+     */
+    void log(Logger.Level level, Object message, Throwable t);
+
+    /**
+     * Issue a log message and throwable at the given log level and a specific logger class name.
+     *
+     * @param level the level
+     * @param loggerFqcn the logger class name
+     * @param message the message
+     * @param t the throwable
+     */
+    void log(Logger.Level level, String loggerFqcn, Object message, Throwable t);
+
+    /**
+     * Issue a log message with parameters at the given log level.
+     *
+     * @param level the level
+     * @param message the message
+     * @param params the message parameters
+     * @deprecated To log a message with parameters, using {@link #logv(org.jboss.logging.Logger.Level , String, Object...)} is recommended.
+     */
+    void log(Logger.Level level, Object message, Object[] params);
+
+    /**
+     * Issue a log message with parameters and a throwable at the given log level.
+     *
+     * @param level the level
+     * @param message the message
+     * @param params the message parameters
+     * @param t the throwable
+     * @deprecated To log a message with parameters, using {@link #logv(org.jboss.logging.Logger.Level , Throwable, String, Object...)} is recommended.
+     */
+    void log(Logger.Level level, Object message, Object[] params, Throwable t);
+
+    /**
+     * Issue a log message with parameters and a throwable at the given log level.
+     *
+     * @param loggerFqcn the logger class name
+     * @param level the level
+     * @param message the message
+     * @param params the message parameters
+     * @param t the throwable
+     */
+    void log(String loggerFqcn, Logger.Level level, Object message, Object[] params, Throwable t);
+
+    /**
+     * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param level the level
+     * @param format the message format string
+     * @param params the parameters
+     */
+    void logv(Logger.Level level, String format, Object... params);
+
+    /**
+     * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param level the level
+     * @param format the message format string
+     * @param param1 the sole parameter
+     */
+    void logv(Logger.Level level, String format, Object param1);
+
+    /**
+     * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param level the level
+     * @param format the message format string
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     */
+    void logv(Logger.Level level, String format, Object param1, Object param2);
+
+    /**
+     * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param level the level
+     * @param format the message format string
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     * @param param3 the third parameter
+     */
+    void logv(Logger.Level level, String format, Object param1, Object param2, Object param3);
+
+    /**
+     * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param level the level
+     * @param t the throwable
+     * @param format the message format string
+     * @param params the parameters
+     */
+    void logv(Logger.Level level, Throwable t, String format, Object... params);
+
+    /**
+     * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param level the level
+     * @param t the throwable
+     * @param format the message format string
+     * @param param1 the sole parameter
+     */
+    void logv(Logger.Level level, Throwable t, String format, Object param1);
+
+    /**
+     * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param level the level
+     * @param t the throwable
+     * @param format the message format string
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     */
+    void logv(Logger.Level level, Throwable t, String format, Object param1, Object param2);
+
+    /**
+     * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting.
+     *
+     * @param level the level
+     * @param t the throwable
+     * @param format the message format string
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     * @param param3 the third parameter
+     */
+    void logv(Logger.Level level, Throwable t, String format, Object param1, Object param2, Object param3);
+
+    /**
+     * Issue a formatted log message at the given log level.
+     *
+     * @param level the level
+     * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
+     * @param params the parameters
+     */
+    void logf(Logger.Level level, String format, Object... params);
+
+    /**
+     * Issue a formatted log message at the given log level.
+     *
+     * @param level the level
+     * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
+     * @param param1 the sole parameter
+     */
+    void logf(Logger.Level level, String format, Object param1);
+
+    /**
+     * Issue a formatted log message at the given log level.
+     *
+     * @param level the level
+     * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     */
+    void logf(Logger.Level level, String format, Object param1, Object param2);
+
+    /**
+     * Issue a formatted log message at the given log level.
+     *
+     * @param level the level
+     * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     * @param param3 the third parameter
+     */
+    void logf(Logger.Level level, String format, Object param1, Object param2, Object param3);
+
+    /**
+     * Issue a formatted log message at the given log level.
+     *
+     * @param level the level
+     * @param t the throwable
+     * @param format the format string, as per {@link String#format(String, Object...)}
+     * @param params the parameters
+     */
+    void logf(Logger.Level level, Throwable t, String format, Object... params);
+
+    /**
+     * Issue a formatted log message at the given log level.
+     *
+     * @param level the level
+     * @param t the throwable
+     * @param format the format string, as per {@link String#format(String, Object...)}
+     * @param param1 the sole parameter
+     */
+    void logf(Logger.Level level, Throwable t, String format, Object param1);
+
+    /**
+     * Issue a formatted log message at the given log level.
+     *
+     * @param level the level
+     * @param t the throwable
+     * @param format the format string, as per {@link String#format(String, Object...)}
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     */
+    void logf(Logger.Level level, Throwable t, String format, Object param1, Object param2);
+
+    /**
+     * Issue a formatted log message at the given log level.
+     *
+     * @param level the level
+     * @param t the throwable
+     * @param format the format string, as per {@link String#format(String, Object...)}
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     * @param param3 the third parameter
+     */
+    void logf(Logger.Level level, Throwable t, String format, Object param1, Object param2, Object param3);
+
+    /**
+     * Log a message at the given level.
+     *
+     * @param loggerFqcn the logger class name
+     * @param level the level
+     * @param t the throwable cause
+     * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
+     * @param param1 the sole parameter
+     */
+    void logf(String loggerFqcn, Logger.Level level, Throwable t, String format, Object param1);
+
+    /**
+     * Log a message at the given level.
+     *
+     * @param loggerFqcn the logger class name
+     * @param level the level
+     * @param t the throwable cause
+     * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     */
+    void logf(String loggerFqcn, Logger.Level level, Throwable t, String format, Object param1, Object param2);
+
+    /**
+     * Log a message at the given level.
+     *
+     * @param loggerFqcn the logger class name
+     * @param level the level
+     * @param t the throwable cause
+     * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
+     * @param param1 the first parameter
+     * @param param2 the second parameter
+     * @param param3 the third parameter
+     */
+    void logf(String loggerFqcn, Logger.Level level, Throwable t, String format, Object param1, Object param2, Object param3);
+
+    /**
+     * Log a message at the given level.
+     *
+     * @param loggerFqcn the logger class name
+     * @param level the level
+     * @param t the throwable cause
+     * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
+     * @param params the message parameters
+     */
+    void logf(String loggerFqcn, Logger.Level level, Throwable t, String format, Object... params);
+}

Modified: jboss-logging/trunk/src/main/java/org/jboss/logging/Logger.java
===================================================================
--- jboss-logging/trunk/src/main/java/org/jboss/logging/Logger.java	2010-04-08 21:47:40 UTC (rev 4235)
+++ jboss-logging/trunk/src/main/java/org/jboss/logging/Logger.java	2010-04-09 01:08:05 UTC (rev 4236)
@@ -22,11 +22,15 @@
 package org.jboss.logging;
 
 import java.io.Serializable;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.util.Locale;
 
 /**
  * An abstracted logging entry point.
  */
-public abstract class Logger implements Serializable {
+public abstract class Logger implements Serializable, BasicLogger {
 
     private static final long serialVersionUID = 4232175575988879434L;
 
@@ -80,14 +84,6 @@
     }
 
     /**
-     * Check to see if the given level is enabled for this logger.
-     *
-     * @param level the level to check for
-     * @return {@code true} if messages may be logged at the given level, {@code false} otherwise
-     */
-    public abstract boolean isEnabled(Level level);
-
-    /**
      * Implementation log method (standard parameter formatting).
      *
      * @param level the level
@@ -2108,7 +2104,7 @@
      * @return the canonical logger instance
      */
     protected final Object writeReplace() {
-        return new SerializedLogger(name, resourceBundleName, prefix);
+        return new SerializedLogger(name, resourceBundleName);
     }
 
     /**
@@ -2120,6 +2116,7 @@
      *
      * @return the logger
      */
+    @Deprecated
     public static Logger getI18nLogger(String name, String resourceBundleName) {
         return LoggerProviders.PROVIDER.getLogger(name, resourceBundleName, null);
     }
@@ -2134,6 +2131,7 @@
      *
      * @return the logger
      */
+    @Deprecated
     public static Logger getI18nLogger(String name, String resourceBundleName, String prefix) {
         return LoggerProviders.PROVIDER.getLogger(name, resourceBundleName, prefix);
     }
@@ -2147,6 +2145,7 @@
      *
      * @return the logger
      */
+    @Deprecated
     public static Logger getI18nLogger(Class<?> clazz, String resourceBundleName) {
         return getI18nLogger(clazz.getName(), resourceBundleName);
     }
@@ -2159,7 +2158,7 @@
      * @return the logger
      */
     public static Logger getLogger(String name) {
-        return getI18nLogger(name, null);
+        return LoggerProviders.PROVIDER.getLogger(name, null, null);
     }
 
     /**
@@ -2200,4 +2199,125 @@
     public static Logger getLogger(Class<?> clazz, String suffix) {
         return getLogger(clazz.getName(), suffix);
     }
+
+    /**
+     * Get a typed logger which implements the given interface.  The current default locale will be used for the new logger.
+     *
+     * @param type the interface to implement
+     * @param category the logger category
+     * @param <T> the logger type
+     * @return the typed logger
+     */
+    public static <T> T getMessageLogger(Class<T> type, String category) {
+        return getMessageLogger(type, category, Locale.getDefault());
+    }
+
+    /**
+     * Get a typed logger which implements the given interface.  The given locale will be used for the new logger.
+     *
+     * @param type the interface to implement
+     * @param category the logger category
+     * @param locale the locale for the new logger
+     * @param <T> the logger type
+     * @return the typed logger
+     */
+    public static <T> T getMessageLogger(Class<T> type, String category, Locale locale) {
+        String language = locale.getLanguage();
+        String country = locale.getCountry();
+        String variant = locale.getVariant();
+
+        Class<? extends T> loggerClass = null;
+        if (variant != null && variant.length() > 0) try {
+            loggerClass = Class.forName(join(type.getName(), "$logger", language, country, variant), true, type.getClassLoader()).asSubclass(type);
+        } catch (ClassNotFoundException e) {
+            // ignore
+        }
+        if (loggerClass == null && country != null && country.length() > 0) try {
+            loggerClass = Class.forName(join(type.getName(), "$logger", language, country, null), true, type.getClassLoader()).asSubclass(type);
+        } catch (ClassNotFoundException e) {
+            // ignore
+        }
+        if (loggerClass == null && language != null && language.length() > 0) try {
+            loggerClass = Class.forName(join(type.getName(), "$logger", language, null, null), true, type.getClassLoader()).asSubclass(type);
+        } catch (ClassNotFoundException e) {
+            // ignore
+        }
+        if (loggerClass == null) try {
+            loggerClass = Class.forName(join(type.getName(), "$logger", null, null, null), true, type.getClassLoader()).asSubclass(type);
+        } catch (ClassNotFoundException e) {
+            throw new IllegalArgumentException("Invalid logger " + type + " (implementation not found)");
+        }
+        final Constructor<? extends T> constructor;
+        try {
+            constructor = loggerClass.getConstructor(Logger.class);
+        } catch (NoSuchMethodException e) {
+            throw new IllegalArgumentException("Logger implementation " + loggerClass + " has no matching constructor");
+        }
+        try {
+            return constructor.newInstance(Logger.getLogger(category));
+        } catch (InstantiationException e) {
+            throw new IllegalArgumentException("Logger implementation " + loggerClass + " could not be instantiated", e);
+        } catch (IllegalAccessException e) {
+            throw new IllegalArgumentException("Logger implementation " + loggerClass + " could not be instantiated", e);
+        } catch (InvocationTargetException e) {
+            throw new IllegalArgumentException("Logger implementation " + loggerClass + " could not be instantiated", e.getCause());
+        }
+    }
+
+    public static <T> T getMessageBundle(Class<T> type, Locale locale) {
+        String language = locale.getLanguage();
+        String country = locale.getCountry();
+        String variant = locale.getVariant();
+
+        Class<? extends T> bundleClass = null;
+        if (variant != null && variant.length() > 0) try {
+            bundleClass = Class.forName(join(type.getName(), "$bundle", language, country, variant), true, type.getClassLoader()).asSubclass(type);
+        } catch (ClassNotFoundException e) {
+            // ignore
+        }
+        if (bundleClass == null && country != null && country.length() > 0) try {
+            bundleClass = Class.forName(join(type.getName(), "$bundle", language, country, null), true, type.getClassLoader()).asSubclass(type);
+        } catch (ClassNotFoundException e) {
+            // ignore
+        }
+        if (bundleClass == null && language != null && language.length() > 0) try {
+            bundleClass = Class.forName(join(type.getName(), "$bundle", language, null, null), true, type.getClassLoader()).asSubclass(type);
+        } catch (ClassNotFoundException e) {
+            // ignore
+        }
+        if (bundleClass == null) try {
+            bundleClass = Class.forName(join(type.getName(), "$bundle", null, null, null), true, type.getClassLoader()).asSubclass(type);
+        } catch (ClassNotFoundException e) {
+            throw new IllegalArgumentException("Invalid bundle " + type + " (implementation not found)");
+        }
+        final Field field;
+        try {
+            field = bundleClass.getField("INSTANCE");
+        } catch (NoSuchFieldException e) {
+            throw new IllegalArgumentException("Bundle implementation " + bundleClass + " has no instance field");
+        }
+        try {
+            return type.cast(field.get(null));
+        } catch (IllegalAccessException e) {
+            throw new IllegalArgumentException("Bundle implementation " + bundleClass + " could not be instantiated", e);
+        }
+    }
+
+    private static String join(String interfaceName, String a, String b, String c, String d) {
+        final StringBuilder build = new StringBuilder();
+        build.append(interfaceName).append('_').append(a);
+        if (b != null && b.length() > 0) {
+            build.append('_');
+            build.append(b);
+        }
+        if (c != null && c.length() > 0) {
+            build.append('_');
+            build.append(c);
+        }
+        if (d != null && d.length() > 0) {
+            build.append('_');
+            build.append(d);
+        }
+        return build.toString();
+    }
 }
\ No newline at end of file

Added: jboss-logging/trunk/src/main/java/org/jboss/logging/ParameterConverter.java
===================================================================
--- jboss-logging/trunk/src/main/java/org/jboss/logging/ParameterConverter.java	                        (rev 0)
+++ jboss-logging/trunk/src/main/java/org/jboss/logging/ParameterConverter.java	2010-04-09 01:08:05 UTC (rev 4236)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.logging;
+
+import java.util.Locale;
+
+/**
+ * A converter for a specific parameter type.
+ *
+ * @author <a href="mailto:david.lloyd at redhat.com">David M. Lloyd</a>
+ * @type <I> the input type
+ */
+public interface ParameterConverter<I> {
+
+    /**
+     * Convert the parameter to its string or string-equivalent representation.  The returned value will be passed in
+     * as a parameter to either a {@link java.text.MessageFormat} or {@link java.util.Formatter} instance, depending
+     * on the setting of {@link org.jboss.logging.annotation.Message#format()}.
+     *
+     * @param locale the locale
+     * @param parameter the parameter
+     * @return the converted value
+     */
+    Object convert(Locale locale, I parameter);
+}

Modified: jboss-logging/trunk/src/main/java/org/jboss/logging/SerializedLogger.java
===================================================================
--- jboss-logging/trunk/src/main/java/org/jboss/logging/SerializedLogger.java	2010-04-08 21:47:40 UTC (rev 4235)
+++ jboss-logging/trunk/src/main/java/org/jboss/logging/SerializedLogger.java	2010-04-09 01:08:05 UTC (rev 4236)
@@ -30,12 +30,10 @@
 
     private final String name;
     private final String resourceBundleName;
-    private final String prefix;
 
-    SerializedLogger(final String name, final String resourceBundleName, final String prefix) {
+    SerializedLogger(final String name, final String resourceBundleName) {
         this.name = name;
         this.resourceBundleName = resourceBundleName;
-        this.prefix = prefix;
     }
 
     protected Object readResolve() {

Added: jboss-logging/trunk/src/main/java/org/jboss/logging/annotation/LogMessage.java
===================================================================
--- jboss-logging/trunk/src/main/java/org/jboss/logging/annotation/LogMessage.java	                        (rev 0)
+++ jboss-logging/trunk/src/main/java/org/jboss/logging/annotation/LogMessage.java	2010-04-09 01:08:05 UTC (rev 4236)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.logging.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import org.jboss.logging.Logger;
+
+/**
+ * A typed logger method.  Indicates that this method will log the associated {@link Message} to the logger system, as
+ * opposed to being a simple message lookup.
+ *
+ * @author <a href="mailto:david.lloyd at redhat.com">David M. Lloyd</a>
+ */
+ at Retention(RetentionPolicy.SOURCE)
+ at Target(ElementType.METHOD)
+public @interface LogMessage {
+
+    /**
+     * The log level at which this message should be logged.  Defaults to {@code INFO}.
+     *
+     * @return the log level
+     */
+    Logger.Level level() default Logger.Level.INFO;
+}

Added: jboss-logging/trunk/src/main/java/org/jboss/logging/annotation/Message.java
===================================================================
--- jboss-logging/trunk/src/main/java/org/jboss/logging/annotation/Message.java	                        (rev 0)
+++ jboss-logging/trunk/src/main/java/org/jboss/logging/annotation/Message.java	2010-04-09 01:08:05 UTC (rev 4236)
@@ -0,0 +1,93 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.logging.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import org.jboss.logging.ParameterConverter;
+
+/**
+ * Assigns a message string to a resource method.  The method arguments are used to supply the positional parameter
+ * values for the method.
+ *
+ * @author <a href="mailto:david.lloyd at redhat.com">David M. Lloyd</a>
+ */
+ at Target(ElementType.METHOD)
+ at Retention(RetentionPolicy.SOURCE)
+public @interface Message {
+
+    /**
+     * Indicates that this message has no ID.
+     */
+    int NONE = 0;
+    /**
+     * Indicates that this message should inherit the ID from another message with the same name.
+     */
+    int INHERIT = -1;
+
+    /**
+     * The message ID number.  Only one message with a given name may specify an ID other than {@link #INHERIT}.
+     *
+     * @return the message ID number
+     */
+    int id() default INHERIT;
+
+    /**
+     * The default format string of this message.
+     *
+     * @return the format string
+     */
+    String value();
+
+    /**
+     * The format type of this method (defaults to {@link Format#PRINTF}).
+     *
+     * @return the format type
+     */
+    Format format() default Format.PRINTF;
+
+    /**
+     * The converter to use.  Any specified converter must implement {@link ParameterConverter}.
+     *
+     * @return the converter
+     */
+    Class<?> converter() default Object.class;
+
+    /**
+     * The possible format types.
+     */
+    enum Format {
+
+        /**
+         * A {@link java.util.Formatter}-type format string.
+         */
+        PRINTF,
+        /**
+         * A {@link java.text.MessageFormat}-type format string.
+         */
+        MESSAGE_FORMAT,
+    }
+
+}

Added: jboss-logging/trunk/src/main/java/org/jboss/logging/annotation/MessageBundle.java
===================================================================
--- jboss-logging/trunk/src/main/java/org/jboss/logging/annotation/MessageBundle.java	                        (rev 0)
+++ jboss-logging/trunk/src/main/java/org/jboss/logging/annotation/MessageBundle.java	2010-04-09 01:08:05 UTC (rev 4236)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.logging.annotation;
+
+/**
+ * Signify that an interface is a message bundle interface.
+ *
+ * @author <a href="mailto:david.lloyd at redhat.com">David M. Lloyd</a>
+ */
+public @interface MessageBundle {
+
+    /**
+     * Get the project code for messages that have an associated code.
+     *
+     * @return the project code
+     */
+    String projectCode() default "";
+}

Added: jboss-logging/trunk/src/main/java/org/jboss/logging/annotation/MessageLogger.java
===================================================================
--- jboss-logging/trunk/src/main/java/org/jboss/logging/annotation/MessageLogger.java	                        (rev 0)
+++ jboss-logging/trunk/src/main/java/org/jboss/logging/annotation/MessageLogger.java	2010-04-09 01:08:05 UTC (rev 4236)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.logging.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Signify that an interface is a typed logger interface.  A message logger interface may optionally extend other message logger
+ * interfaces and message bundle interfaces (see {@link MessageBundle}, as well as the {@link org.jboss.logging.BasicLogger} interface.
+ *
+ * @author <a href="mailto:david.lloyd at redhat.com">David M. Lloyd</a>
+ */
+ at Retention(RetentionPolicy.SOURCE)
+ at Target(ElementType.TYPE)
+public @interface MessageLogger {
+}

Added: jboss-logging/trunk/src/main/java/org/jboss/logging/annotation/Translation.java
===================================================================
--- jboss-logging/trunk/src/main/java/org/jboss/logging/annotation/Translation.java	                        (rev 0)
+++ jboss-logging/trunk/src/main/java/org/jboss/logging/annotation/Translation.java	2010-04-09 01:08:05 UTC (rev 4236)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.logging.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * A single translation of a message.
+ *
+ * @author <a href="mailto:david.lloyd at redhat.com">David M. Lloyd</a>
+ */
+ at Target({})
+ at Retention(RetentionPolicy.SOURCE)
+public @interface Translation {
+
+    /**
+     * The locale, in the form <code>"aa[_bb[_cc]]"</code> where "aa" is the language (e.g. "en"), "bb" is the country (e.g. "US"), and
+     * "cc" is the variant.
+     *
+     * @return the locale
+     */
+    String locale();
+
+    /**
+     * The translation of this message.
+     *
+     * @return the translation
+     */
+    String message();
+}

Added: jboss-logging/trunk/src/main/java/org/jboss/logging/annotation/Translations.java
===================================================================
--- jboss-logging/trunk/src/main/java/org/jboss/logging/annotation/Translations.java	                        (rev 0)
+++ jboss-logging/trunk/src/main/java/org/jboss/logging/annotation/Translations.java	2010-04-09 01:08:05 UTC (rev 4236)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.logging.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Assigns multiple translations of a message to a method.
+ *
+ * @author <a href="mailto:david.lloyd at redhat.com">David M. Lloyd</a>
+ */
+ at Target(ElementType.METHOD)
+ at Retention(RetentionPolicy.SOURCE)
+public @interface Translations {
+
+    /**
+     * The translations.
+     *
+     * @return the translations
+     */
+    Translation[] value();
+}



More information about the jboss-svn-commits mailing list