logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject svn commit: r1176228 - in /logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers: log4j12-api/src/main/java/org/apache/log4j/ log4j12-api/src/test/java/org/apache/log4j/ log4j2-api/src/main/java/org/apache/logging/log4j/spi/ log4j2-api/src/test/java/or...
Date Tue, 27 Sep 2011 06:33:10 GMT
Author: rgoers
Date: Tue Sep 27 06:33:10 2011
New Revision: 1176228

URL: http://svn.apache.org/viewvc?rev=1176228&view=rev
Log:
Fixes for LOG4J2-50 and LOG4J2-51

Removed:
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/spi/LoggerFactory.java
Modified:
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/main/java/org/apache/log4j/Category.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/main/java/org/apache/log4j/LogManager.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/test/java/org/apache/log4j/CategoryTest.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/spi/LoggerContext.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/test/java/org/apache/logging/log4j/SimpleLogger.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/test/java/org/apache/logging/log4j/SimpleLoggerContext.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/Logger.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/src/changes/changes.xml

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/main/java/org/apache/log4j/Category.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/main/java/org/apache/log4j/Category.java?rev=1176228&r1=1176227&r2=1176228&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/main/java/org/apache/log4j/Category.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/main/java/org/apache/log4j/Category.java Tue Sep 27 06:33:10 2011
@@ -16,7 +16,6 @@
  */
 package org.apache.log4j;
 
-import org.apache.logging.log4j.Marker;
 import org.apache.logging.log4j.core.LoggerContext;
 import org.apache.logging.log4j.core.helpers.NameUtil;
 import org.apache.logging.log4j.message.LocalizedMessage;
@@ -40,8 +39,6 @@ public class Category {
     private static final Map<LoggerContext, ConcurrentMap<String, Logger>> CONTEXT_MAP =
         new WeakHashMap<LoggerContext, ConcurrentMap<String, Logger>>();
 
-    private static final CategoryFactory FACTORY = new CategoryFactory();
-
     private static final String FQCN = Category.class.getName();
 
     /**
@@ -57,7 +54,7 @@ public class Category {
      * @param name The name of the Logger.
      */
     protected Category(LoggerContext context, String name) {
-        this.logger = context.getLogger(getFactory(), name);
+        this.logger = context.getLogger(name);
     }
 
     /**
@@ -95,7 +92,6 @@ public class Category {
         return getInstance(clazz.getName());
     }
 
-
     static Category getInstance(LoggerContext context, Class clazz) {
         return getInstance(context, clazz.getName());
     }
@@ -176,11 +172,11 @@ public class Category {
     }
 
     public void debug(Object message) {
-        logger.debug(message);
+        maybeLog(FQCN, org.apache.logging.log4j.Level.DEBUG, message, null);
     }
 
     public void debug(Object message, Throwable t) {
-        logger.debug(message, t);
+        maybeLog(FQCN, org.apache.logging.log4j.Level.DEBUG, message, t);
     }
 
     public boolean isDebugEnabled() {
@@ -188,11 +184,11 @@ public class Category {
     }
 
     public void error(Object message) {
-        logger.error(message);
+        maybeLog(FQCN, org.apache.logging.log4j.Level.ERROR, message, null);
     }
 
     public void error(Object message, Throwable t) {
-        logger.error(message, t);
+        maybeLog(FQCN, org.apache.logging.log4j.Level.ERROR, message, t);
     }
 
     public boolean isErrorEnabled() {
@@ -200,11 +196,11 @@ public class Category {
     }
 
     public void warn(Object message) {
-        logger.warn(message);
+        maybeLog(FQCN, org.apache.logging.log4j.Level.WARN, message, null);
     }
 
     public void warn(Object message, Throwable t) {
-        logger.warn(message, t);
+        maybeLog(FQCN, org.apache.logging.log4j.Level.WARN, message, t);
     }
 
     public boolean isWarnEnabled() {
@@ -212,11 +208,11 @@ public class Category {
     }
 
     public void fatal(Object message) {
-        logger.fatal(message);
+        maybeLog(FQCN, org.apache.logging.log4j.Level.FATAL, message, null);
     }
 
     public void fatal(Object message, Throwable t) {
-        logger.fatal(message, t);
+        maybeLog(FQCN, org.apache.logging.log4j.Level.FATAL, message, t);
     }
 
     public boolean isFatalEnabled() {
@@ -224,11 +220,11 @@ public class Category {
     }
 
     public void info(Object message) {
-        logger.info(message);
+        maybeLog(FQCN, org.apache.logging.log4j.Level.INFO, message, null);
     }
 
     public void info(Object message, Throwable t) {
-        logger.info(message, t);
+        maybeLog(FQCN, org.apache.logging.log4j.Level.INFO, message, t);
     }
 
     public boolean isInfoEnabled() {
@@ -236,11 +232,11 @@ public class Category {
     }
 
     public void trace(Object message) {
-        logger.trace(message);
+        maybeLog(FQCN, org.apache.logging.log4j.Level.TRACE, message, null);
     }
 
     public void trace(Object message, Throwable t) {
-        logger.trace(message, t);
+        maybeLog(FQCN, org.apache.logging.log4j.Level.TRACE, message, t);
     }
 
     public boolean isTraceEnabled() {
@@ -249,12 +245,12 @@ public class Category {
 
     public boolean isEnabledFor(Priority level) {
         org.apache.logging.log4j.Level lvl = org.apache.logging.log4j.Level.toLevel(level.toString());
-        return ((CategoryFactory.CategoryLogger) logger).isEnabledFor(lvl);
+        return isEnabledFor(lvl);
     }
 
     public void forcedLog(String fqcn, Priority level, Object message, Throwable t) {
         org.apache.logging.log4j.Level lvl = org.apache.logging.log4j.Level.toLevel(level.toString());
-        ((CategoryFactory.CategoryLogger) logger).log(null, fqcn, lvl, new ObjectMessage(message), t);
+        logger.log(null, fqcn, lvl, new ObjectMessage(message), t);
     }
 
     public boolean exists(String name) {
@@ -305,8 +301,11 @@ public class Category {
         }
     }
 
-    protected org.apache.logging.log4j.spi.LoggerFactory getFactory() {
-        return FACTORY;
+    private void maybeLog(String fqcn, org.apache.logging.log4j.Level level,
+            Object message, Throwable throwable) {
+        if(logger.isEnabled(level, null, message, throwable)) {
+            logger.log(null, FQCN, level, new ObjectMessage(message), throwable);
+        }
     }
 
     /**
@@ -334,38 +333,8 @@ public class Category {
         }
     }
 
-    /**
-     * Private Category factory.
-     */
-    private static class CategoryFactory implements org.apache.logging.log4j.spi.LoggerFactory<LoggerContext> {
-
-        public org.apache.logging.log4j.core.Logger newInstance(LoggerContext ctx, String name) {
-            return new CategoryLogger(ctx, name);
-        }
-
-        /**
-         * Category Logger.
-         */
-        public class CategoryLogger extends org.apache.logging.log4j.core.Logger {
-
-            public CategoryLogger(LoggerContext ctx, String name) {
-                super(ctx, name);
-            }
-
-            @Override
-            public String getFQCN() {
-               return FQCN;
-            }
-
-            @Override
-            public void log(Marker marker, String fqcn, org.apache.logging.log4j.Level level,
-                               Message data, Throwable t) {
-                super.log(marker, fqcn, level, data, t);
-            }
-
-            public boolean isEnabledFor(org.apache.logging.log4j.Level level) {
-                return isEnabled(level, null, null);
-            }
-        }
+    private boolean isEnabledFor(org.apache.logging.log4j.Level level) {
+        return logger.isEnabled(level, null, null);
     }
+
 }

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/main/java/org/apache/log4j/LogManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/main/java/org/apache/log4j/LogManager.java?rev=1176228&r1=1176227&r2=1176228&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/main/java/org/apache/log4j/LogManager.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/main/java/org/apache/log4j/LogManager.java Tue Sep 27 06:33:10 2011
@@ -16,7 +16,7 @@
  */
 package org.apache.log4j;
 
-import org.apache.logging.log4j.spi.LoggerContext;
+import org.apache.logging.log4j.core.LoggerContext;
 
 /**
  *
@@ -27,19 +27,19 @@ public final class LogManager {
     }
 
     public static Logger getRootLogger() {
-        return (Logger) PrivateManager.getLogger("");
+        return (Logger) Category.getInstance((LoggerContext) PrivateManager.getContext(), "");
     }
 
     public static Logger getLogger(final String name) {
-        return (Logger) PrivateManager.getLogger(name);
+        return (Logger) Category.getInstance((LoggerContext) PrivateManager.getContext(), name);
     }
 
     public static Logger getLogger(final Class clazz) {
-        return (Logger) PrivateManager.getLogger(clazz.getName());
+        return (Logger) Category.getInstance((LoggerContext) PrivateManager.getContext(), clazz.getName());
     }
 
     public static Logger exists(String name) {
-        LoggerContext ctx = PrivateManager.getContext();
+        LoggerContext ctx = (LoggerContext) PrivateManager.getContext();
         if (!ctx.hasLogger(name)) {
             return null;
         }
@@ -52,7 +52,8 @@ public final class LogManager {
     private static class PrivateManager extends org.apache.logging.log4j.LogManager {
         private static final String FQCN = LogManager.class.getName();
 
-        public static LoggerContext getContext() {
+
+        public static org.apache.logging.log4j.spi.LoggerContext getContext() {
             return getContext(FQCN, false);
         }
 

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/test/java/org/apache/log4j/CategoryTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/test/java/org/apache/log4j/CategoryTest.java?rev=1176228&r1=1176227&r2=1176228&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/test/java/org/apache/log4j/CategoryTest.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/test/java/org/apache/log4j/CategoryTest.java Tue Sep 27 06:33:10 2011
@@ -110,6 +110,25 @@ public class CategoryTest {
     }
 
     /**
+     * Test using a pre-existing log4j2 logger
+     */
+    @Test
+    public void testExistingLog4j2Logger() {
+        // create the logger using LogManager
+        org.apache.logging.log4j.LogManager.getLogger("existingLogger");
+        // Logger will be the one created above
+        Logger logger = Logger.getLogger("existingLogger");
+        Logger l2 = LogManager.getLogger("existingLogger");
+        assertEquals(logger, l2);
+        logger.setLevel(Level.ERROR);
+        Priority debug = Level.DEBUG;
+        // the next line will throw an exception if the LogManager loggers
+        // aren't supported by 1.2 Logger/Category
+        logger.l7dlog(debug, "Hello, World", new Object[0], null);
+        assertTrue(appender.getEvents().size() == 0);
+    }
+
+    /**
      * Tests setPriority(Priority).
      *
      * @deprecated

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java?rev=1176228&r1=1176227&r2=1176228&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java Tue Sep 27 06:33:10 2011
@@ -57,17 +57,14 @@ public abstract class AbstractLogger imp
      */
     public static final Marker CATCHING_MARKER = MarkerManager.getMarker("CATCHING", EXCEPTION_MARKER);
 
-    protected String getFQCN() {
-        return AbstractLogger.class.getName();
-    }
-
+    private static final String FQCN = AbstractLogger.class.getName();
 
     /**
      * Log entry to a method.
      */
     public void entry() {
         if (isEnabled(Level.TRACE, ENTRY_MARKER, (Object) null, null)) {
-            log(ENTRY_MARKER, getFQCN(), Level.TRACE, new SimpleMessage(" entry"), null);
+            log(ENTRY_MARKER, FQCN, Level.TRACE, new SimpleMessage(" entry"), null);
         }
     }
 
@@ -79,7 +76,7 @@ public abstract class AbstractLogger imp
      */
     public void entry(Object... params) {
         if (isEnabled(Level.TRACE, ENTRY_MARKER, (Object) null, null)) {
-            log(ENTRY_MARKER, getFQCN(), Level.TRACE, entryMsg(params.length, params), null);
+            log(ENTRY_MARKER, FQCN, Level.TRACE, entryMsg(params.length, params), null);
         }
     }
 
@@ -88,7 +85,7 @@ public abstract class AbstractLogger imp
      */
     public void exit() {
         if (isEnabled(Level.TRACE, EXIT_MARKER, (Object) null, null)) {
-            log(EXIT_MARKER, getFQCN(), Level.TRACE, exitMsg(null), null);
+            log(EXIT_MARKER, FQCN, Level.TRACE, exitMsg(null), null);
         }
     }
 
@@ -99,7 +96,7 @@ public abstract class AbstractLogger imp
      */
     public void exit(Object result) {
         if (isEnabled(Level.TRACE, EXIT_MARKER, (Object) null, null)) {
-            log(EXIT_MARKER, getFQCN(), Level.TRACE, exitMsg(result), null);
+            log(EXIT_MARKER, FQCN, Level.TRACE, exitMsg(result), null);
         }
     }
 
@@ -110,7 +107,7 @@ public abstract class AbstractLogger imp
      */
     public void throwing(Throwable t) {
         if (isEnabled(Level.ERROR, THROWING_MARKER, (Object) null, null)) {
-            log(THROWING_MARKER, getFQCN(), Level.ERROR, new SimpleMessage("throwing"), t);
+            log(THROWING_MARKER, FQCN, Level.ERROR, new SimpleMessage("throwing"), t);
         }
     }
 
@@ -123,7 +120,7 @@ public abstract class AbstractLogger imp
      */
     public void throwing(Level level, Throwable t) {
         if (isEnabled(level, THROWING_MARKER, (Object) null, null)) {
-            log(THROWING_MARKER, getFQCN(), level, new SimpleMessage("throwing"), t);
+            log(THROWING_MARKER, FQCN, level, new SimpleMessage("throwing"), t);
         }
     }
 
@@ -134,7 +131,7 @@ public abstract class AbstractLogger imp
      */
     public void catching(Throwable t) {
         if (isEnabled(Level.DEBUG, THROWING_MARKER, (Object) null, null)) {
-            log(THROWING_MARKER, getFQCN(), Level.DEBUG, new SimpleMessage("catching"), t);
+            log(THROWING_MARKER, FQCN, Level.DEBUG, new SimpleMessage("catching"), t);
         }
     }
 
@@ -146,7 +143,7 @@ public abstract class AbstractLogger imp
      */
     public void catching(Level level, Throwable t) {
         if (isEnabled(level, THROWING_MARKER, (Object) null, null)) {
-            log(THROWING_MARKER, getFQCN(), level, new SimpleMessage("catching"), t);
+            log(THROWING_MARKER, FQCN, level, new SimpleMessage("catching"), t);
         }
     }
 
@@ -157,7 +154,7 @@ public abstract class AbstractLogger imp
      */
     public void trace(String message) {
         if (isEnabled(Level.TRACE, null, message)) {
-            log(null, getFQCN(), Level.TRACE, new SimpleMessage(message), null);
+            log(null, FQCN, Level.TRACE, new SimpleMessage(message), null);
         }
     }
 
@@ -169,7 +166,7 @@ public abstract class AbstractLogger imp
      */
     public void trace(Marker marker, String message) {
         if (isEnabled(Level.TRACE, marker, message)) {
-            log(marker, getFQCN(), Level.TRACE, new SimpleMessage(message), null);
+            log(marker, FQCN, Level.TRACE, new SimpleMessage(message), null);
         }
     }
 
@@ -186,7 +183,7 @@ public abstract class AbstractLogger imp
      */
     public void trace(String message, Throwable t) {
         if (isEnabled(Level.TRACE, null, message, t)) {
-            log(null, getFQCN(), Level.TRACE, new SimpleMessage(message), t);
+            log(null, FQCN, Level.TRACE, new SimpleMessage(message), t);
         }
     }
 
@@ -205,7 +202,7 @@ public abstract class AbstractLogger imp
      */
     public void trace(Marker marker, String message, Throwable t) {
         if (isEnabled(Level.TRACE, marker, message, t)) {
-            log(marker, getFQCN(), Level.TRACE, new SimpleMessage(message), t);
+            log(marker, FQCN, Level.TRACE, new SimpleMessage(message), t);
         }
     }
 
@@ -216,7 +213,7 @@ public abstract class AbstractLogger imp
      */
     public void trace(Object message) {
         if (isEnabled(Level.TRACE, null, message, null)) {
-            log(null, getFQCN(), Level.TRACE, new ObjectMessage(message), null);
+            log(null, FQCN, Level.TRACE, new ObjectMessage(message), null);
         }
     }
 
@@ -228,7 +225,7 @@ public abstract class AbstractLogger imp
      */
     public void trace(Marker marker, Object message) {
         if (isEnabled(Level.TRACE, marker, message, null)) {
-            log(marker, getFQCN(), Level.TRACE, new ObjectMessage(message), null);
+            log(marker, FQCN, Level.TRACE, new ObjectMessage(message), null);
         }
     }
 
@@ -245,7 +242,7 @@ public abstract class AbstractLogger imp
      */
     public void trace(Object message, Throwable t) {
         if (isEnabled(Level.TRACE, null, message, t)) {
-            log(null, getFQCN(), Level.TRACE, new ObjectMessage(message), t);
+            log(null, FQCN, Level.TRACE, new ObjectMessage(message), t);
         }
     }
 
@@ -263,7 +260,7 @@ public abstract class AbstractLogger imp
      */
     public void trace(Marker marker, Object message, Throwable t) {
         if (isEnabled(Level.TRACE, marker, message, t)) {
-            log(marker, getFQCN(), Level.TRACE, new ObjectMessage(message), t);
+            log(marker, FQCN, Level.TRACE, new ObjectMessage(message), t);
         }
     }
 
@@ -276,7 +273,7 @@ public abstract class AbstractLogger imp
     public void trace(String message, Object... params) {
         if (isEnabled(Level.TRACE, null, message, params)) {
             ParameterizedMessage msg = new ParameterizedMessage(message, params);
-            log(null, getFQCN(), Level.TRACE, msg, msg.getThrowable());
+            log(null, FQCN, Level.TRACE, msg, msg.getThrowable());
         }
     }
 
@@ -290,7 +287,7 @@ public abstract class AbstractLogger imp
     public void trace(Marker marker, String message, Object... params) {
         if (isEnabled(Level.TRACE, marker, message, params)) {
             ParameterizedMessage msg = new ParameterizedMessage(message, params);
-            log(marker, getFQCN(), Level.TRACE, msg, msg.getThrowable());
+            log(marker, FQCN, Level.TRACE, msg, msg.getThrowable());
         }
     }
 
@@ -322,7 +319,7 @@ public abstract class AbstractLogger imp
      */
     public void trace(Message msg) {
         if (isEnabled(Level.TRACE, null, msg, null)) {
-            log(null, getFQCN(), Level.TRACE, msg, null);
+            log(null, FQCN, Level.TRACE, msg, null);
         }
     }
 
@@ -334,7 +331,7 @@ public abstract class AbstractLogger imp
      */
     public void trace(Message msg, Throwable t) {
         if (isEnabled(Level.TRACE, null, msg, t)) {
-            log(null, getFQCN(), Level.TRACE, msg, t);
+            log(null, FQCN, Level.TRACE, msg, t);
         }
     }
 
@@ -346,7 +343,7 @@ public abstract class AbstractLogger imp
      */
     public void trace(Marker marker, Message msg) {
         if (isEnabled(Level.TRACE, marker, msg, null)) {
-            log(marker, getFQCN(), Level.TRACE, msg, null);
+            log(marker, FQCN, Level.TRACE, msg, null);
         }
     }
 
@@ -359,7 +356,7 @@ public abstract class AbstractLogger imp
      */
     public void trace(Marker marker, Message msg, Throwable t) {
         if (isEnabled(Level.TRACE, marker, msg, t)) {
-            log(marker, getFQCN(), Level.TRACE, msg, t);
+            log(marker, FQCN, Level.TRACE, msg, t);
         }
     }
 
@@ -370,7 +367,7 @@ public abstract class AbstractLogger imp
      */
     public void debug(String message) {
         if (isEnabled(Level.DEBUG, null, message)) {
-            log(null, getFQCN(), Level.DEBUG, new SimpleMessage(message), null);
+            log(null, FQCN, Level.DEBUG, new SimpleMessage(message), null);
         }
     }
 
@@ -382,7 +379,7 @@ public abstract class AbstractLogger imp
      */
     public void debug(Marker marker, String message) {
         if (isEnabled(Level.DEBUG, marker, message)) {
-            log(marker, getFQCN(), Level.DEBUG, new SimpleMessage(message), null);
+            log(marker, FQCN, Level.DEBUG, new SimpleMessage(message), null);
         }
     }
 
@@ -395,7 +392,7 @@ public abstract class AbstractLogger imp
      */
     public void debug(String message, Throwable t) {
         if (isEnabled(Level.DEBUG, null, message, t)) {
-            log(null, getFQCN(), Level.DEBUG, new SimpleMessage(message), t);
+            log(null, FQCN, Level.DEBUG, new SimpleMessage(message), t);
         }
     }
 
@@ -409,7 +406,7 @@ public abstract class AbstractLogger imp
      */
     public void debug(Marker marker, String message, Throwable t) {
         if (isEnabled(Level.DEBUG, marker, message, t)) {
-            log(marker, getFQCN(), Level.DEBUG, new SimpleMessage(message), t);
+            log(marker, FQCN, Level.DEBUG, new SimpleMessage(message), t);
         }
     }
     /**
@@ -419,7 +416,7 @@ public abstract class AbstractLogger imp
      */
     public void debug(Object message) {
         if (isEnabled(Level.DEBUG, null, message, null)) {
-            log(null, getFQCN(), Level.DEBUG, new ObjectMessage(message), null);
+            log(null, FQCN, Level.DEBUG, new ObjectMessage(message), null);
         }
     }
 
@@ -431,7 +428,7 @@ public abstract class AbstractLogger imp
      */
     public void debug(Marker marker, Object message) {
         if (isEnabled(Level.DEBUG, marker, message, null)) {
-            log(marker, getFQCN(), Level.DEBUG, new ObjectMessage(message), null);
+            log(marker, FQCN, Level.DEBUG, new ObjectMessage(message), null);
         }
     }
 
@@ -444,7 +441,7 @@ public abstract class AbstractLogger imp
      */
     public void debug(Object message, Throwable t) {
         if (isEnabled(Level.DEBUG, null, message, t)) {
-            log(null, getFQCN(), Level.DEBUG, new ObjectMessage(message), t);
+            log(null, FQCN, Level.DEBUG, new ObjectMessage(message), t);
         }
     }
 
@@ -458,7 +455,7 @@ public abstract class AbstractLogger imp
      */
     public void debug(Marker marker, Object message, Throwable t) {
         if (isEnabled(Level.DEBUG, marker, message, t)) {
-            log(marker, getFQCN(), Level.DEBUG, new ObjectMessage(message), t);
+            log(marker, FQCN, Level.DEBUG, new ObjectMessage(message), t);
         }
     }
 
@@ -471,7 +468,7 @@ public abstract class AbstractLogger imp
     public void debug(String message, Object... params) {
         if (isEnabled(Level.DEBUG, null, message, params)) {
             ParameterizedMessage msg = new ParameterizedMessage(message, params);
-            log(null, getFQCN(), Level.DEBUG, msg, msg.getThrowable());
+            log(null, FQCN, Level.DEBUG, msg, msg.getThrowable());
         }
     }
 
@@ -485,7 +482,7 @@ public abstract class AbstractLogger imp
     public void debug(Marker marker, String message, Object... params) {
         if (isEnabled(Level.DEBUG, marker, message, params)) {
             ParameterizedMessage msg = new ParameterizedMessage(message, params);
-            log(marker, getFQCN(), Level.DEBUG, msg, msg.getThrowable());
+            log(marker, FQCN, Level.DEBUG, msg, msg.getThrowable());
         }
     }
 
@@ -517,7 +514,7 @@ public abstract class AbstractLogger imp
      */
     public void debug(Message msg) {
         if (isEnabled(Level.TRACE, null, msg, null)) {
-            log(null, getFQCN(), Level.TRACE, msg, null);
+            log(null, FQCN, Level.TRACE, msg, null);
         }
     }
 
@@ -529,7 +526,7 @@ public abstract class AbstractLogger imp
      */
     public void debug(Message msg, Throwable t) {
         if (isEnabled(Level.TRACE, null, msg, t)) {
-            log(null, getFQCN(), Level.TRACE, msg, t);
+            log(null, FQCN, Level.TRACE, msg, t);
         }
     }
 
@@ -541,7 +538,7 @@ public abstract class AbstractLogger imp
      */
     public void debug(Marker marker, Message msg) {
         if (isEnabled(Level.DEBUG, marker, msg, null)) {
-            log(marker, getFQCN(), Level.DEBUG, msg, null);
+            log(marker, FQCN, Level.DEBUG, msg, null);
         }
     }
 
@@ -554,7 +551,7 @@ public abstract class AbstractLogger imp
      */
     public void debug(Marker marker, Message msg, Throwable t) {
         if (isEnabled(Level.DEBUG, marker, msg, t)) {
-            log(marker, getFQCN(), Level.DEBUG, msg, t);
+            log(marker, FQCN, Level.DEBUG, msg, t);
         }
     }
 
@@ -565,7 +562,7 @@ public abstract class AbstractLogger imp
      */
     public void info(String message) {
         if (isEnabled(Level.INFO, null, message)) {
-            log(null, getFQCN(), Level.INFO, new SimpleMessage(message), null);
+            log(null, FQCN, Level.INFO, new SimpleMessage(message), null);
         }
     }
 
@@ -577,7 +574,7 @@ public abstract class AbstractLogger imp
      */
     public void info(Marker marker, String message) {
         if (isEnabled(Level.INFO, marker, message)) {
-            log(marker, getFQCN(), Level.INFO, new SimpleMessage(message), null);
+            log(marker, FQCN, Level.INFO, new SimpleMessage(message), null);
         }
     }
 
@@ -590,7 +587,7 @@ public abstract class AbstractLogger imp
      */
     public void info(String message, Throwable t) {
         if (isEnabled(Level.INFO, null, message, t)) {
-            log(null, getFQCN(), Level.INFO, new SimpleMessage(message), t);
+            log(null, FQCN, Level.INFO, new SimpleMessage(message), t);
         }
     }
 
@@ -604,7 +601,7 @@ public abstract class AbstractLogger imp
      */
     public void info(Marker marker, String message, Throwable t) {
         if (isEnabled(Level.INFO, marker, message, t)) {
-            log(marker, getFQCN(), Level.INFO, new SimpleMessage(message), t);
+            log(marker, FQCN, Level.INFO, new SimpleMessage(message), t);
         }
     }
 
@@ -615,7 +612,7 @@ public abstract class AbstractLogger imp
      */
     public void info(Object message) {
         if (isEnabled(Level.INFO, null, message, null)) {
-            log(null, getFQCN(), Level.INFO, new ObjectMessage(message), null);
+            log(null, FQCN, Level.INFO, new ObjectMessage(message), null);
         }
     }
 
@@ -627,7 +624,7 @@ public abstract class AbstractLogger imp
      */
     public void info(Marker marker, Object message) {
         if (isEnabled(Level.INFO, marker, message, null)) {
-            log(marker, getFQCN(), Level.INFO, new ObjectMessage(message), null);
+            log(marker, FQCN, Level.INFO, new ObjectMessage(message), null);
         }
     }
 
@@ -640,7 +637,7 @@ public abstract class AbstractLogger imp
      */
     public void info(Object message, Throwable t) {
         if (isEnabled(Level.INFO, null, message, t)) {
-            log(null, getFQCN(), Level.INFO, new ObjectMessage(message), t);
+            log(null, FQCN, Level.INFO, new ObjectMessage(message), t);
         }
     }
 
@@ -655,7 +652,7 @@ public abstract class AbstractLogger imp
      */
     public void info(Marker marker, Object message, Throwable t) {
         if (isEnabled(Level.INFO, marker, message, t)) {
-            log(marker, getFQCN(), Level.INFO, new ObjectMessage(message), t);
+            log(marker, FQCN, Level.INFO, new ObjectMessage(message), t);
         }
     }
 
@@ -668,7 +665,7 @@ public abstract class AbstractLogger imp
     public void info(String message, Object... params) {
         if (isEnabled(Level.INFO, null, message, params)) {
             ParameterizedMessage msg = new ParameterizedMessage(message, params);
-            log(null, getFQCN(), Level.INFO, msg, msg.getThrowable());
+            log(null, FQCN, Level.INFO, msg, msg.getThrowable());
         }
     }
 
@@ -682,7 +679,7 @@ public abstract class AbstractLogger imp
     public void info(Marker marker, String message, Object... params) {
         if (isEnabled(Level.INFO, marker, message, params)) {
             ParameterizedMessage msg = new ParameterizedMessage(message, params);
-            log(marker, getFQCN(), Level.INFO, msg, msg.getThrowable());
+            log(marker, FQCN, Level.INFO, msg, msg.getThrowable());
         }
     }
 
@@ -713,7 +710,7 @@ public abstract class AbstractLogger imp
      */
     public void info(Message msg) {
         if (isEnabled(Level.INFO, null, msg, null)) {
-            log(null, getFQCN(), Level.INFO, msg, null);
+            log(null, FQCN, Level.INFO, msg, null);
         }
     }
 
@@ -725,7 +722,7 @@ public abstract class AbstractLogger imp
      */
     public void info(Message msg, Throwable t) {
         if (isEnabled(Level.INFO, null, msg, t)) {
-            log(null, getFQCN(), Level.INFO, msg, t);
+            log(null, FQCN, Level.INFO, msg, t);
         }
     }
 
@@ -737,7 +734,7 @@ public abstract class AbstractLogger imp
      */
     public void info(Marker marker, Message msg) {
         if (isEnabled(Level.INFO, null, msg, null)) {
-            log(marker, getFQCN(), Level.INFO, msg, null);
+            log(marker, FQCN, Level.INFO, msg, null);
         }
     }
 
@@ -750,7 +747,7 @@ public abstract class AbstractLogger imp
      */
     public void info(Marker marker, Message msg, Throwable t) {
         if (isEnabled(Level.INFO, marker, msg, t)) {
-            log(marker, getFQCN(), Level.INFO, msg, t);
+            log(marker, FQCN, Level.INFO, msg, t);
         }
     }
 
@@ -761,7 +758,7 @@ public abstract class AbstractLogger imp
      */
     public void warn(String message) {
         if (isEnabled(Level.WARN, null, message)) {
-            log(null, getFQCN(), Level.WARN, new SimpleMessage(message), null);
+            log(null, FQCN, Level.WARN, new SimpleMessage(message), null);
         }
     }
 
@@ -773,7 +770,7 @@ public abstract class AbstractLogger imp
      */
     public void warn(Marker marker, String message) {
         if (isEnabled(Level.WARN, marker, message)) {
-            log(marker, getFQCN(), Level.WARN, new SimpleMessage(message), null);
+            log(marker, FQCN, Level.WARN, new SimpleMessage(message), null);
         }
     }
 
@@ -786,7 +783,7 @@ public abstract class AbstractLogger imp
      */
     public void warn(String message, Throwable t) {
         if (isEnabled(Level.WARN, null, message, t)) {
-            log(null, getFQCN(), Level.DEBUG, new SimpleMessage(message), t);
+            log(null, FQCN, Level.DEBUG, new SimpleMessage(message), t);
         }
     }
 
@@ -800,7 +797,7 @@ public abstract class AbstractLogger imp
      */
     public void warn(Marker marker, String message, Throwable t) {
         if (isEnabled(Level.WARN, marker, message, t)) {
-            log(marker, getFQCN(), Level.DEBUG, new SimpleMessage(message), t);
+            log(marker, FQCN, Level.DEBUG, new SimpleMessage(message), t);
         }
     }
 
@@ -812,7 +809,7 @@ public abstract class AbstractLogger imp
      */
     public void warn(Marker marker, Object message) {
         if (isEnabled(Level.WARN, marker, message, null)) {
-            log(marker, getFQCN(), Level.WARN, new ObjectMessage(message), null);
+            log(marker, FQCN, Level.WARN, new ObjectMessage(message), null);
         }
     }
 
@@ -823,7 +820,7 @@ public abstract class AbstractLogger imp
      */
     public void warn(Object message) {
         if (isEnabled(Level.WARN, null, message, null)) {
-            log(null, getFQCN(), Level.WARN, new ObjectMessage(message), null);
+            log(null, FQCN, Level.WARN, new ObjectMessage(message), null);
         }
     }
 
@@ -836,7 +833,7 @@ public abstract class AbstractLogger imp
      */
     public void warn(Object message, Throwable t) {
         if (isEnabled(Level.WARN, null, message, t)) {
-            log(null, getFQCN(), Level.DEBUG, new ObjectMessage(message), t);
+            log(null, FQCN, Level.DEBUG, new ObjectMessage(message), t);
         }
     }
 
@@ -850,7 +847,7 @@ public abstract class AbstractLogger imp
      */
     public void warn(Marker marker, Object message, Throwable t) {
         if (isEnabled(Level.WARN, marker, message, t)) {
-            log(marker, getFQCN(), Level.DEBUG, new ObjectMessage(message), t);
+            log(marker, FQCN, Level.DEBUG, new ObjectMessage(message), t);
         }
     }
 
@@ -863,7 +860,7 @@ public abstract class AbstractLogger imp
     public void warn(String message, Object... params) {
         if (isEnabled(Level.WARN, null, message, params)) {
             ParameterizedMessage msg = new ParameterizedMessage(message, params);
-            log(null, getFQCN(), Level.WARN, msg, msg.getThrowable());
+            log(null, FQCN, Level.WARN, msg, msg.getThrowable());
         }
     }
 
@@ -877,7 +874,7 @@ public abstract class AbstractLogger imp
     public void warn(Marker marker, String message, Object... params) {
         if (isEnabled(Level.WARN, marker, message, params)) {
             ParameterizedMessage msg = new ParameterizedMessage(message, params);
-            log(marker, getFQCN(), Level.WARN, msg, msg.getThrowable());
+            log(marker, FQCN, Level.WARN, msg, msg.getThrowable());
         }
     }
 
@@ -909,7 +906,7 @@ public abstract class AbstractLogger imp
      */
     public void warn(Message msg) {
         if (isEnabled(Level.WARN, null, msg, null)) {
-            log(null, getFQCN(), Level.WARN, msg, null);
+            log(null, FQCN, Level.WARN, msg, null);
         }
     }
 
@@ -921,7 +918,7 @@ public abstract class AbstractLogger imp
      */
     public void warn(Message msg, Throwable t) {
         if (isEnabled(Level.WARN, null, msg, t)) {
-            log(null, getFQCN(), Level.WARN, msg, t);
+            log(null, FQCN, Level.WARN, msg, t);
         }
     }
 
@@ -933,7 +930,7 @@ public abstract class AbstractLogger imp
      */
     public void warn(Marker marker, Message msg) {
         if (isEnabled(Level.WARN, null, msg, null)) {
-            log(marker, getFQCN(), Level.WARN, msg, null);
+            log(marker, FQCN, Level.WARN, msg, null);
         }
     }
 
@@ -946,7 +943,7 @@ public abstract class AbstractLogger imp
      */
     public void warn(Marker marker, Message msg, Throwable t) {
         if (isEnabled(Level.WARN, marker, msg, t)) {
-            log(marker, getFQCN(), Level.WARN, msg, t);
+            log(marker, FQCN, Level.WARN, msg, t);
         }
     }
 
@@ -957,7 +954,7 @@ public abstract class AbstractLogger imp
      */
     public void error(String message) {
         if (isEnabled(Level.ERROR, null, message)) {
-            log(null, getFQCN(), Level.ERROR, new SimpleMessage(message), null);
+            log(null, FQCN, Level.ERROR, new SimpleMessage(message), null);
         }
     }
 
@@ -969,7 +966,7 @@ public abstract class AbstractLogger imp
      */
     public void error(Marker marker, String message) {
         if (isEnabled(Level.ERROR, marker, message)) {
-            log(marker, getFQCN(), Level.ERROR, new SimpleMessage(message), null);
+            log(marker, FQCN, Level.ERROR, new SimpleMessage(message), null);
         }
     }
 
@@ -982,7 +979,7 @@ public abstract class AbstractLogger imp
      */
     public void error(String message, Throwable t) {
         if (isEnabled(Level.ERROR, null, message, t)) {
-            log(null, getFQCN(), Level.ERROR, new SimpleMessage(message), t);
+            log(null, FQCN, Level.ERROR, new SimpleMessage(message), t);
         }
     }
 
@@ -996,7 +993,7 @@ public abstract class AbstractLogger imp
      */
     public void error(Marker marker, String message, Throwable t) {
         if (isEnabled(Level.ERROR, marker, message, t)) {
-            log(marker, getFQCN(), Level.ERROR, new SimpleMessage(message), t);
+            log(marker, FQCN, Level.ERROR, new SimpleMessage(message), t);
         }
     }
 
@@ -1007,7 +1004,7 @@ public abstract class AbstractLogger imp
      */
     public void error(Object message) {
         if (isEnabled(Level.ERROR, null, message, null)) {
-            log(null, getFQCN(), Level.ERROR, new ObjectMessage(message), null);
+            log(null, FQCN, Level.ERROR, new ObjectMessage(message), null);
         }
     }
 
@@ -1019,7 +1016,7 @@ public abstract class AbstractLogger imp
      */
     public void error(Marker marker, Object message) {
         if (isEnabled(Level.ERROR, marker, message, null)) {
-            log(marker, getFQCN(), Level.ERROR, new ObjectMessage(message), null);
+            log(marker, FQCN, Level.ERROR, new ObjectMessage(message), null);
         }
     }
 
@@ -1032,7 +1029,7 @@ public abstract class AbstractLogger imp
      */
     public void error(Object message, Throwable t) {
         if (isEnabled(Level.ERROR, null, message, t)) {
-            log(null, getFQCN(), Level.ERROR, new ObjectMessage(message), t);
+            log(null, FQCN, Level.ERROR, new ObjectMessage(message), t);
         }
     }
 
@@ -1046,7 +1043,7 @@ public abstract class AbstractLogger imp
      */
     public void error(Marker marker, Object message, Throwable t) {
         if (isEnabled(Level.ERROR, marker, message, t)) {
-            log(marker, getFQCN(), Level.ERROR, new ObjectMessage(message), t);
+            log(marker, FQCN, Level.ERROR, new ObjectMessage(message), t);
         }
     }
 
@@ -1059,7 +1056,7 @@ public abstract class AbstractLogger imp
     public void error(String message, Object... params) {
         if (isEnabled(Level.ERROR, null, message, params)) {
             ParameterizedMessage msg = new ParameterizedMessage(message, params);
-            log(null, getFQCN(), Level.ERROR, msg, msg.getThrowable());
+            log(null, FQCN, Level.ERROR, msg, msg.getThrowable());
         }
     }
 
@@ -1073,7 +1070,7 @@ public abstract class AbstractLogger imp
     public void error(Marker marker, String message, Object... params) {
         if (isEnabled(Level.ERROR, marker, message, params)) {
             ParameterizedMessage msg = new ParameterizedMessage(message, params);
-            log(marker, getFQCN(), Level.ERROR, msg, msg.getThrowable());
+            log(marker, FQCN, Level.ERROR, msg, msg.getThrowable());
         }
     }
 
@@ -1106,7 +1103,7 @@ public abstract class AbstractLogger imp
      */
     public void error(Message msg) {
         if (isEnabled(Level.ERROR, null, msg, null)) {
-            log(null, getFQCN(), Level.ERROR, msg, null);
+            log(null, FQCN, Level.ERROR, msg, null);
         }
     }
 
@@ -1118,7 +1115,7 @@ public abstract class AbstractLogger imp
      */
     public void error(Message msg, Throwable t) {
         if (isEnabled(Level.ERROR, null, msg, t)) {
-            log(null, getFQCN(), Level.ERROR, msg, t);
+            log(null, FQCN, Level.ERROR, msg, t);
         }
     }
 
@@ -1130,7 +1127,7 @@ public abstract class AbstractLogger imp
      */
     public void error(Marker marker, Message msg) {
         if (isEnabled(Level.ERROR, null, msg, null)) {
-            log(null, getFQCN(), Level.ERROR, msg, null);
+            log(null, FQCN, Level.ERROR, msg, null);
         }
     }
 
@@ -1143,7 +1140,7 @@ public abstract class AbstractLogger imp
      */
     public void error(Marker marker, Message msg, Throwable t) {
         if (isEnabled(Level.TRACE, marker, msg, t)) {
-            log(marker, getFQCN(), Level.TRACE, msg, t);
+            log(marker, FQCN, Level.TRACE, msg, t);
         }
     }
 
@@ -1154,7 +1151,7 @@ public abstract class AbstractLogger imp
      */
     public void fatal(String message) {
         if (isEnabled(Level.FATAL, null, message)) {
-            log(null, getFQCN(), Level.FATAL, new SimpleMessage(message), null);
+            log(null, FQCN, Level.FATAL, new SimpleMessage(message), null);
         }
     }
 
@@ -1167,7 +1164,7 @@ public abstract class AbstractLogger imp
      */
     public void fatal(Marker marker, String message) {
         if (isEnabled(Level.FATAL, marker, message)) {
-            log(marker, getFQCN(), Level.FATAL, new SimpleMessage(message), null);
+            log(marker, FQCN, Level.FATAL, new SimpleMessage(message), null);
         }
     }
 
@@ -1180,7 +1177,7 @@ public abstract class AbstractLogger imp
      */
     public void fatal(String message, Throwable t) {
         if (isEnabled(Level.FATAL, null, message, t)) {
-            log(null, getFQCN(), Level.FATAL, new SimpleMessage(message), t);
+            log(null, FQCN, Level.FATAL, new SimpleMessage(message), t);
         }
     }
 
@@ -1194,7 +1191,7 @@ public abstract class AbstractLogger imp
      */
     public void fatal(Marker marker, String message, Throwable t) {
         if (isEnabled(Level.FATAL, marker, message, t)) {
-            log(marker, getFQCN(), Level.FATAL, new SimpleMessage(message), t);
+            log(marker, FQCN, Level.FATAL, new SimpleMessage(message), t);
         }
     }
 
@@ -1205,7 +1202,7 @@ public abstract class AbstractLogger imp
      */
     public void fatal(Object message) {
         if (isEnabled(Level.FATAL, null, message, null)) {
-            log(null, getFQCN(), Level.FATAL, new ObjectMessage(message), null);
+            log(null, FQCN, Level.FATAL, new ObjectMessage(message), null);
         }
     }
 
@@ -1217,7 +1214,7 @@ public abstract class AbstractLogger imp
      */
     public void fatal(Marker marker, Object message) {
         if (isEnabled(Level.FATAL, marker, message, null)) {
-            log(marker, getFQCN(), Level.FATAL, new ObjectMessage(message), null);
+            log(marker, FQCN, Level.FATAL, new ObjectMessage(message), null);
         }
     }
 
@@ -1230,7 +1227,7 @@ public abstract class AbstractLogger imp
      */
     public void fatal(Object message, Throwable t) {
         if (isEnabled(Level.FATAL, null, message, t)) {
-            log(null, getFQCN(), Level.FATAL, new ObjectMessage(message), t);
+            log(null, FQCN, Level.FATAL, new ObjectMessage(message), t);
         }
     }
 
@@ -1244,7 +1241,7 @@ public abstract class AbstractLogger imp
      */
     public void fatal(Marker marker, Object message, Throwable t) {
         if (isEnabled(Level.FATAL, marker, message, t)) {
-            log(marker, getFQCN(), Level.FATAL, new ObjectMessage(message), t);
+            log(marker, FQCN, Level.FATAL, new ObjectMessage(message), t);
         }
     }
 
@@ -1257,7 +1254,7 @@ public abstract class AbstractLogger imp
     public void fatal(String message, Object... params) {
         if (isEnabled(Level.FATAL, null, message, params)) {
             ParameterizedMessage msg = new ParameterizedMessage(message, params);
-            log(null, getFQCN(), Level.FATAL, msg, msg.getThrowable());
+            log(null, FQCN, Level.FATAL, msg, msg.getThrowable());
         }
     }
 
@@ -1271,7 +1268,7 @@ public abstract class AbstractLogger imp
     public void fatal(Marker marker, String message, Object... params) {
         if (isEnabled(Level.FATAL, marker, message, params)) {
             ParameterizedMessage msg = new ParameterizedMessage(message, params);
-            log(marker, getFQCN(), Level.FATAL, msg, msg.getThrowable());
+            log(marker, FQCN, Level.FATAL, msg, msg.getThrowable());
         }
     }
 
@@ -1303,7 +1300,7 @@ public abstract class AbstractLogger imp
      */
     public void fatal(Message msg) {
         if (isEnabled(Level.FATAL, null, msg, null)) {
-            log(null, getFQCN(), Level.FATAL, msg, null);
+            log(null, FQCN, Level.FATAL, msg, null);
         }
     }
 
@@ -1315,7 +1312,7 @@ public abstract class AbstractLogger imp
      */
     public void fatal(Message msg, Throwable t) {
         if (isEnabled(Level.FATAL, null, msg, t)) {
-            log(null, getFQCN(), Level.FATAL, msg, t);
+            log(null, FQCN, Level.FATAL, msg, t);
         }
     }
 
@@ -1327,7 +1324,7 @@ public abstract class AbstractLogger imp
      */
     public void fatal(Marker marker, Message msg) {
         if (isEnabled(Level.FATAL, null, msg, null)) {
-            log(null, getFQCN(), Level.FATAL, msg, null);
+            log(null, FQCN, Level.FATAL, msg, null);
         }
     }
 
@@ -1340,7 +1337,7 @@ public abstract class AbstractLogger imp
      */
     public void fatal(Marker marker, Message msg, Throwable t) {
         if (isEnabled(Level.FATAL, marker, msg, t)) {
-            log(marker, getFQCN(), Level.FATAL, msg, t);
+            log(marker, FQCN, Level.FATAL, msg, t);
         }
     }
 

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/spi/LoggerContext.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/spi/LoggerContext.java?rev=1176228&r1=1176227&r2=1176228&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/spi/LoggerContext.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/spi/LoggerContext.java Tue Sep 27 06:33:10 2011
@@ -31,14 +31,6 @@ public interface LoggerContext {
     Logger getLogger(String name);
 
     /**
-     * Return a Logger using the specified factory to create it.
-     * @param factory The LoggerFactory.
-     * @param name The name of the Logger.
-     * @return The Logger with the specified name.
-     */
-    Logger getLogger(LoggerFactory factory, String name);
-
-    /**
      * Detect if a Logger with the specified name exists.
      * @param name The Logger name to search for.
      * @return true if the Logger exists, false otherwise.

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/test/java/org/apache/logging/log4j/SimpleLogger.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/test/java/org/apache/logging/log4j/SimpleLogger.java?rev=1176228&r1=1176227&r2=1176228&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/test/java/org/apache/logging/log4j/SimpleLogger.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/test/java/org/apache/logging/log4j/SimpleLogger.java Tue Sep 27 06:33:10 2011
@@ -31,11 +31,6 @@ import java.util.Map;
 public class SimpleLogger extends AbstractLogger {
     private List<String> array = new ArrayList<String>();
 
-    @Override
-    protected String getFQCN() {
-        return SimpleLogger.class.getName();
-    }
-
     public List<String> getEntries() {
         return array;
     }

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/test/java/org/apache/logging/log4j/SimpleLoggerContext.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/test/java/org/apache/logging/log4j/SimpleLoggerContext.java?rev=1176228&r1=1176227&r2=1176228&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/test/java/org/apache/logging/log4j/SimpleLoggerContext.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/test/java/org/apache/logging/log4j/SimpleLoggerContext.java Tue Sep 27 06:33:10 2011
@@ -17,7 +17,6 @@
 package org.apache.logging.log4j;
 
 import org.apache.logging.log4j.spi.LoggerContext;
-import org.apache.logging.log4j.spi.LoggerFactory;
 
 /**
  *
@@ -37,7 +36,4 @@ public class SimpleLoggerContext impleme
         return null;
     }
 
-    public Logger getLogger(LoggerFactory factory, String name) {
-        return factory.newInstance(this, name);
-    }
 }

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/Logger.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/Logger.java?rev=1176228&r1=1176227&r2=1176228&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/Logger.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/Logger.java Tue Sep 27 06:33:10 2011
@@ -104,48 +104,48 @@ public class Logger extends AbstractLogg
     }
 
     @Override
-    protected void log(Marker marker, String fqcn, Level level, Message data, Throwable t) {
+    public void log(Marker marker, String fqcn, Level level, Message data, Throwable t) {
         config.loggerConfig.log(name, marker, fqcn, level, data, t);
     }
 
     @Override
-    protected boolean isEnabled(Level level, Marker marker, String msg) {
+    public boolean isEnabled(Level level, Marker marker, String msg) {
         return config.filter(level, marker, msg);
     }
 
     @Override
-    protected boolean isEnabled(Level level, Marker marker, String msg, Throwable t) {
+    public boolean isEnabled(Level level, Marker marker, String msg, Throwable t) {
         return config.filter(level, marker, msg, t);
     }
 
     @Override
-    protected boolean isEnabled(Level level, Marker marker, String msg, Object p1) {
+    public boolean isEnabled(Level level, Marker marker, String msg, Object p1) {
         return config.filter(level, marker, msg, p1);
     }
 
     @Override
-    protected boolean isEnabled(Level level, Marker marker, String msg, Object p1, Object p2) {
+    public boolean isEnabled(Level level, Marker marker, String msg, Object p1, Object p2) {
         return config.filter(level, marker, msg, p1, p2);
     }
 
     @Override
-    protected boolean isEnabled(Level level, Marker marker, String msg, Object p1, Object p2, Object p3) {
+    public boolean isEnabled(Level level, Marker marker, String msg, Object p1, Object p2, Object p3) {
         return config.filter(level, marker, msg, p1, p2, p3);
     }
 
     @Override
-    protected boolean isEnabled(Level level, Marker marker, String msg, Object p1, Object p2, Object p3,
+    public boolean isEnabled(Level level, Marker marker, String msg, Object p1, Object p2, Object p3,
                                 Object... params) {
         return config.filter(level, marker, msg, p1, p2, p3, params);
     }
 
     @Override
-    protected boolean isEnabled(Level level, Marker marker, Object msg, Throwable t) {
+    public boolean isEnabled(Level level, Marker marker, Object msg, Throwable t) {
         return config.filter(level, marker, msg, t);
     }
 
     @Override
-    protected boolean isEnabled(Level level, Marker marker, Message msg, Throwable t) {
+    public boolean isEnabled(Level level, Marker marker, Message msg, Throwable t) {
         return config.filter(level, marker, msg, t);
     }
 

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java?rev=1176228&r1=1176227&r2=1176228&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java Tue Sep 27 06:33:10 2011
@@ -21,7 +21,6 @@ import org.apache.logging.log4j.core.con
 import org.apache.logging.log4j.core.config.ConfigurationListener;
 import org.apache.logging.log4j.core.config.NullConfiguration;
 import org.apache.logging.log4j.status.StatusLogger;
-import org.apache.logging.log4j.spi.LoggerFactory;
 
 import java.io.File;
 import java.net.URI;
@@ -37,8 +36,6 @@ public class LoggerContext implements or
 
     private static StatusLogger logger = StatusLogger.getLogger();
 
-    private static final LoggerFactory<LoggerContext> FACTORY = new Factory();
-
     private static final long JVM_START_TIME = System.currentTimeMillis();
 
     private final ConcurrentMap<String, Logger> loggers = new ConcurrentHashMap<String, Logger>();
@@ -139,23 +136,13 @@ public class LoggerContext implements or
      * @return The Logger.
      */
     public Logger getLogger(String name) {
-        return getLogger(FACTORY, name);
-    }
-
-    /**
-     * Obtain a Logger from the Context using the specified LoggerFactory.
-     * @param factory The LoggerFactory.
-     * @param name The name of the Logger.
-     * @return The Logger.
-     */
-    public Logger getLogger(LoggerFactory factory, String name) {
 
         Logger logger = loggers.get(name);
         if (logger != null) {
             return logger;
         }
 
-        logger = (Logger) factory.newInstance(this, name);
+        logger = (Logger) newInstance(this, name);
         Logger prev = loggers.putIfAbsent(name, logger);
         return prev == null ? logger : prev;
     }
@@ -264,13 +251,8 @@ public class LoggerContext implements or
         reconfigure();
     }
 
-    /**
-     * The default LoggerFactory.
-     */
-    private static class Factory implements LoggerFactory<LoggerContext> {
 
-        public Logger newInstance(LoggerContext ctx, String name) {
-            return new Logger(ctx, name);
-        }
+    private Logger newInstance(LoggerContext ctx, String name) {
+        return new Logger(ctx, name);
     }
 }

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/src/changes/changes.xml?rev=1176228&r1=1176227&r2=1176228&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/src/changes/changes.xml (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/src/changes/changes.xml Tue Sep 27 06:33:10 2011
@@ -22,7 +22,15 @@
   </properties>
 
   <body>
-    <release version="2.0" date="" description="Rewrite of Log4j">
+    <release version="2.0" date="TBD" description="Rewrite of Log4j">
+      <action issue="VFS-51" dev="rgoers" type="fix" due-to="John Vasileff">
+        Remove LoggerContext support for custom logger factories. All Loggers returned
+        by LoggerContext should be compatibile and of the same type.
+      </action>
+      <action issue="VFS-50" dev="rgoers" type="fix" due-to="John Vasileff">
+        Make sure all application facing log methods use their own FQCN. This patch
+        resolves a unit test failure for the %C pattern when using the Category logger.
+      </action>
     </release>
   </body>
 </document>



Mime
View raw message