logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nickwilli...@apache.org
Subject svn commit: r1566249 - in /logging/log4j/log4j2/trunk: log4j-1.2-api/src/main/java/org/apache/log4j/ log4j-1.2-api/src/main/java/org/apache/log4j/xml/ log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/ log4j-jcl/src/main/java/org/apa...
Date Sun, 09 Feb 2014 07:47:17 GMT
Author: nickwilliams
Date: Sun Feb  9 07:47:17 2014
New Revision: 1566249

URL: http://svn.apache.org/r1566249
Log:
Resolving a bunch of Checkstyle, FindBugs, CPD, and PMD complaints in all modules except API
and Core

Modified:
    logging/log4j/log4j2/trunk/log4j-1.2-api/src/main/java/org/apache/log4j/PropertyConfigurator.java
    logging/log4j/log4j2/trunk/log4j-1.2-api/src/main/java/org/apache/log4j/xml/DOMConfigurator.java
    logging/log4j/log4j2/trunk/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeAppender.java
    logging/log4j/log4j2/trunk/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedManager.java
    logging/log4j/log4j2/trunk/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java
    logging/log4j/log4j2/trunk/log4j-jcl/src/main/java/org/apache/logging/log4j/jcl/Log4jLog.java
    logging/log4j/log4j2/trunk/log4j-jmx-gui/src/main/java/org/apache/logging/log4j/jmx/gui/Client.java
    logging/log4j/log4j2/trunk/log4j-jmx-gui/src/main/java/org/apache/logging/log4j/jmx/gui/ClientGUI.java
    logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/helpers/EventDataConverter.java
    logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/helpers/MarkerWrapper.java
    logging/log4j/log4j2/trunk/log4j-taglib/src/main/java/org/apache/logging/log4j/taglib/Log4jTaglibLogger.java
    logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLogger.java
    logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLoggerContextFactory.java

Modified: logging/log4j/log4j2/trunk/log4j-1.2-api/src/main/java/org/apache/log4j/PropertyConfigurator.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-1.2-api/src/main/java/org/apache/log4j/PropertyConfigurator.java?rev=1566249&r1=1566248&r2=1566249&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-1.2-api/src/main/java/org/apache/log4j/PropertyConfigurator.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-1.2-api/src/main/java/org/apache/log4j/PropertyConfigurator.java
Sun Feb  9 07:47:17 2014
@@ -63,7 +63,7 @@ public class PropertyConfigurator {
      * @param configURL The configuration URL
      * @param hierarchy The hierarchy
      */
-    public void doConfigure(final java.net.URL configURL, final LoggerRepository hierarchy)
{
+    public void doConfigure(final URL configURL, final LoggerRepository hierarchy) {
     }
 
     /**

Modified: logging/log4j/log4j2/trunk/log4j-1.2-api/src/main/java/org/apache/log4j/xml/DOMConfigurator.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-1.2-api/src/main/java/org/apache/log4j/xml/DOMConfigurator.java?rev=1566249&r1=1566248&r2=1566249&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-1.2-api/src/main/java/org/apache/log4j/xml/DOMConfigurator.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-1.2-api/src/main/java/org/apache/log4j/xml/DOMConfigurator.java
Sun Feb  9 07:47:17 2014
@@ -72,7 +72,8 @@ public class DOMConfigurator {
 
     }
 
-    public static Object parseElement(final Element element, final Properties props, @SuppressWarnings("rawtypes")
final Class expectedClass)
+    public static Object parseElement(final Element element, final Properties props,
+                                      @SuppressWarnings("rawtypes") final Class expectedClass)
         throws Exception {
         return null;
     }

Modified: logging/log4j/log4j2/trunk/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeAppender.java?rev=1566249&r1=1566248&r2=1566249&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeAppender.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeAppender.java
Sun Feb  9 07:47:17 2014
@@ -216,7 +216,7 @@ public final class FlumeAppender extends
         final int reqTimeout = Integers.parseInt(requestTimeout, 0);
         final int retries = Integers.parseInt(agentRetries, 0);
         final int lockTimeoutRetryCount = Integers.parseInt(lockTimeoutRetries, DEFAULT_LOCK_TIMEOUT_RETRY_COUNT);
-        final int delay = Integers.parseInt(maxDelay, DEFAULT_MAX_DELAY );
+        final int delay = Integers.parseInt(maxDelay, DEFAULT_MAX_DELAY);
 
         if (layout == null) {
             layout = RFC5424Layout.createLayout(null, null, null, "True", null, mdcPrefix,
eventPrefix,

Modified: logging/log4j/log4j2/trunk/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedManager.java?rev=1566249&r1=1566248&r2=1566249&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedManager.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedManager.java
Sun Feb  9 07:47:17 2014
@@ -187,7 +187,7 @@ public class FlumeEmbeddedManager extend
                 throw new ConfigurationException("No Flume configuration provided");
             }
 
-            if ((agents != null && agents.length > 0 && properties !=
null && properties.length > 0)) {
+            if (agents != null && agents.length > 0 && properties != null
&& properties.length > 0) {
                 LOGGER.error("Agents and Flume configuration cannot both be specified");
                 throw new ConfigurationException("Agents and Flume configuration cannot both
be specified");
             }
@@ -215,7 +215,7 @@ public class FlumeEmbeddedManager extend
                 final StringBuilder sb = new StringBuilder();
                 String leading = "";
                 int priority = agents.length;
-                for (int i = 0; i < agents.length; ++i) {
+                for (int i = 0; i < priority; ++i) {
                     sb.append(leading).append("agent").append(i);
                     leading = " ";
                     final String prefix = "agent" + i;

Modified: logging/log4j/log4j2/trunk/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java?rev=1566249&r1=1566248&r2=1566249&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java
Sun Feb  9 07:47:17 2014
@@ -35,7 +35,6 @@ import java.util.concurrent.atomic.Atomi
 import javax.crypto.Cipher;
 import javax.crypto.SecretKey;
 
-import com.sleepycat.je.LockConflictException;
 import org.apache.flume.Event;
 import org.apache.flume.event.SimpleEvent;
 import org.apache.logging.log4j.LoggingException;
@@ -54,6 +53,7 @@ import com.sleepycat.je.DatabaseConfig;
 import com.sleepycat.je.DatabaseEntry;
 import com.sleepycat.je.Environment;
 import com.sleepycat.je.EnvironmentConfig;
+import com.sleepycat.je.LockConflictException;
 import com.sleepycat.je.LockMode;
 import com.sleepycat.je.OperationStatus;
 import com.sleepycat.je.StatsConfig;
@@ -141,6 +141,7 @@ public class FlumePersistentManager exte
      * @param connectionTimeout The amount of time to wait to establish a connection.
      * @param requestTimeout The amount of time to wait for a response to a request.
      * @param delay Amount of time to delay before delivering a batch.
+     * @param lockTimeoutRetryCount The number of times to retry after a lock timeout.
      * @param dataDir The location of the Berkeley database.
      * @return A FlumeAvroManager.
      */
@@ -221,7 +222,7 @@ public class FlumePersistentManager exte
         worker.shutdown();
         try {
             worker.join(SHUTDOWN_WAIT * MILLIS_PER_SECOND);
-        } catch(InterruptedException ie) {
+        } catch (InterruptedException ie) {
             // Ignore the exception and shutdown.
         }
         threadPool.shutdown();
@@ -320,7 +321,7 @@ public class FlumePersistentManager exte
                             txn.abort();
                             txn = null;
                         } catch (Exception ex) {
-                            // Ignore exception
+                            LOGGER.trace("Ignoring exception while aborting transaction during
lock conflict.");
                         }
                     }
 
@@ -519,7 +520,7 @@ public class FlumePersistentManager exte
                 long now = System.currentTimeMillis();
                 long dbCount = database.count();
                 dbCounter.set(dbCount);
-                if (dbCount >= batchSize || (dbCount > 0 && nextBatch <=
now)) {
+                if (dbCount >= batchSize || dbCount > 0 && nextBatch <=
now) {
                     nextBatch = now + manager.delay;
                     try {
                         boolean errors = false;
@@ -596,7 +597,7 @@ public class FlumePersistentManager exte
                                             cursor.close();
                                             cursor = null;
                                         } catch (Exception ex) {
-                                            // Ignore exception
+                                            LOGGER.trace("Ignored exception closing cursor
during lock conflict.");
                                         }
                                     }
                                     if (txn != null) {
@@ -604,7 +605,7 @@ public class FlumePersistentManager exte
                                             txn.abort();
                                             txn = null;
                                         } catch (Exception ex) {
-                                            // Ignore exception
+                                            LOGGER.trace("Ignored exception aborting tx during
lock conflict.");
                                         }
                                     }
                                 }
@@ -706,7 +707,7 @@ public class FlumePersistentManager exte
                                         cursor.close();
                                         cursor = null;
                                     } catch (Exception ex) {
-                                        // Ignore exception
+                                        LOGGER.trace("Ignored exception closing cursor during
lock conflict.");
                                     }
                                 }
                                 if (txn != null) {
@@ -714,7 +715,7 @@ public class FlumePersistentManager exte
                                         txn.abort();
                                         txn = null;
                                     } catch (Exception ex) {
-                                        // Ignore exception
+                                        LOGGER.trace("Ignored exception aborting transaction
during lock conflict.");
                                     }
                                 }
                             } catch (final Exception ex) {
@@ -730,7 +731,7 @@ public class FlumePersistentManager exte
                                     cursor.close();
                                     cursor = null;
                                 } catch (Exception ex) {
-                                    // Ignore exception
+                                    LOGGER.trace("Ignored exception closing cursor during
lock conflict.");
                                 }
                             }
                             if (txn != null) {
@@ -738,7 +739,7 @@ public class FlumePersistentManager exte
                                     txn.abort();
                                     txn = null;
                                 } catch (Exception ex) {
-                                    // Ignore exception
+                                    LOGGER.trace("Ignored exception aborting transaction
during lock conflict.");
                                 }
                             }
                         } finally {
@@ -823,7 +824,7 @@ public class FlumePersistentManager exte
         }
 
         @Override
-	    public Thread newThread(final Runnable r) {
+        public Thread newThread(final Runnable r) {
             final Thread thread = new Thread(group, r, namePrefix + threadNumber.getAndIncrement(),
0);
             thread.setDaemon(true);
             if (thread.getPriority() != Thread.NORM_PRIORITY) {
@@ -833,6 +834,9 @@ public class FlumePersistentManager exte
         }
     }
 
+    /**
+     * An internal class.
+     */
     private static class Gate {
 
         private boolean isOpen = false;

Modified: logging/log4j/log4j2/trunk/log4j-jcl/src/main/java/org/apache/logging/log4j/jcl/Log4jLog.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-jcl/src/main/java/org/apache/logging/log4j/jcl/Log4jLog.java?rev=1566249&r1=1566248&r2=1566249&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-jcl/src/main/java/org/apache/logging/log4j/jcl/Log4jLog.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-jcl/src/main/java/org/apache/logging/log4j/jcl/Log4jLog.java
Sun Feb  9 07:47:17 2014
@@ -27,7 +27,7 @@ public class Log4jLog extends AbstractLo
 
     private static final long serialVersionUID = 1L;
 
-	public Log4jLog(final AbstractLogger logger, final String name) {
+    public Log4jLog(final AbstractLogger logger, final String name) {
         super(logger, name, null);
     }
 }

Modified: logging/log4j/log4j2/trunk/log4j-jmx-gui/src/main/java/org/apache/logging/log4j/jmx/gui/Client.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-jmx-gui/src/main/java/org/apache/logging/log4j/jmx/gui/Client.java?rev=1566249&r1=1566248&r2=1566249&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-jmx-gui/src/main/java/org/apache/logging/log4j/jmx/gui/Client.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-jmx-gui/src/main/java/org/apache/logging/log4j/jmx/gui/Client.java
Sun Feb  9 07:47:17 2014
@@ -51,7 +51,7 @@ public class Client {
      *             one of the remote mbeans
      * @throws IOException if the connection failed
      */
-    public Client(final JMXConnector connector) throws JMException, IOException {
+    public Client(final JMXConnector connector) throws MalformedObjectNameException, IOException
{
         this.connector = Assert.isNotNull(connector, "JMXConnector");
         this.connector.connect();
         this.connection = connector.getMBeanServerConnection();
@@ -68,12 +68,12 @@ public class Client {
      *             one of the remote mbeans
      * @throws IOException if the connection failed
      */
-    public Client(final MBeanServerConnection mBeanServerConnection) throws JMException,
IOException {
+    public Client(final MBeanServerConnection mBeanServerConnection) throws MalformedObjectNameException,
IOException {
         this.connection = mBeanServerConnection;
         init();
     }
 
-    private void init() throws JMException, IOException {
+    private void init() throws MalformedObjectNameException, IOException {
     }
 
     private Set<ObjectName> find(String pattern) throws JMException, IOException {
@@ -87,8 +87,8 @@ public class Client {
      * remote {@code LoggerContextAdminMBean}s.
      * 
      * @return a list of proxies to the remote {@code LoggerContextAdminMBean}s
-     * @throws IOException
-     * @throws JMException
+     * @throws IOException If an I/O error occurred
+     * @throws JMException If a management error occurred
      */
     public List<LoggerContextAdminMBean> getLoggerContextAdmins() throws JMException,
IOException {
         List<LoggerContextAdminMBean> result = new ArrayList<LoggerContextAdminMBean>();
@@ -134,11 +134,11 @@ public class Client {
      * 
      * @param contextName search key
      * @return StatusLoggerAdminMBean or null
-     * @throws MalformedObjectNameException
-     * @throws IOException
+     * @throws MalformedObjectNameException If an object name is malformed
+     * @throws IOException If an I/O error occurred
      */
-    public StatusLoggerAdminMBean getStatusLoggerAdmin(String contextName) throws MalformedObjectNameException,
-            IOException {
+    public StatusLoggerAdminMBean getStatusLoggerAdmin(String contextName)
+            throws MalformedObjectNameException, IOException {
         final String pattern = StatusLoggerAdminMBean.PATTERN;
         final String mbean = String.format(pattern, Server.escape(contextName));
         final ObjectName search = new ObjectName(mbean);

Modified: logging/log4j/log4j2/trunk/log4j-jmx-gui/src/main/java/org/apache/logging/log4j/jmx/gui/ClientGUI.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-jmx-gui/src/main/java/org/apache/logging/log4j/jmx/gui/ClientGUI.java?rev=1566249&r1=1566248&r2=1566249&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-jmx-gui/src/main/java/org/apache/logging/log4j/jmx/gui/ClientGUI.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-jmx-gui/src/main/java/org/apache/logging/log4j/jmx/gui/ClientGUI.java
Sun Feb  9 07:47:17 2014
@@ -69,6 +69,7 @@ import org.apache.logging.log4j.core.jmx
  */
 public class ClientGUI extends JPanel implements NotificationListener {
     private static final long serialVersionUID = -253621277232291174L;
+    private static final int INITIAL_STRING_WRITER_SIZE = 1024;
     private final Client client;
     private Map<ObjectName, Component> contextObjNameToTabbedPaneMap = new HashMap<ObjectName,
Component>();
     private Map<ObjectName, JTextArea> statusLogTextAreaMap = new HashMap<ObjectName,
JTextArea>();
@@ -229,7 +230,7 @@ public class ClientGUI extends JPanel im
         System.err.println(msg);
         ex.printStackTrace();
 
-        StringWriter sw = new StringWriter(1024);
+        StringWriter sw = new StringWriter(INITIAL_STRING_WRITER_SIZE);
         ex.printStackTrace(new PrintWriter(sw));
         JOptionPane.showMessageDialog(this, sw.toString(), msg, JOptionPane.ERROR_MESSAGE);
     }

Modified: logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/helpers/EventDataConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/helpers/EventDataConverter.java?rev=1566249&r1=1566248&r2=1566249&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/helpers/EventDataConverter.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/helpers/EventDataConverter.java
Sun Feb  9 07:47:17 2014
@@ -30,10 +30,10 @@ public class EventDataConverter {
 
     public Message convertEvent(final String message, final Object[] objects, final Throwable
throwable) {
         try {
-            final EventData data = (objects != null && objects[0] instanceof EventData)
? (EventData) objects[0]
-                    : new EventData(message);
-            final StructuredDataMessage msg = new StructuredDataMessage(data.getEventId(),
data.getMessage(),
-                    data.getEventType());
+            final EventData data = objects != null && objects[0] instanceof EventData
?
+                    (EventData) objects[0] : new EventData(message);
+            final StructuredDataMessage msg =
+                    new StructuredDataMessage(data.getEventId(), data.getMessage(), data.getEventType());
             for (final Map.Entry<String, Object> entry : data.getEventMap().entrySet())
{
                 final String key = entry.getKey();
                 if (EventData.EVENT_TYPE.equals(key) || EventData.EVENT_ID.equals(key)

Modified: logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/helpers/MarkerWrapper.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/helpers/MarkerWrapper.java?rev=1566249&r1=1566248&r2=1566249&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/helpers/MarkerWrapper.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/helpers/MarkerWrapper.java
Sun Feb  9 07:47:17 2014
@@ -41,12 +41,12 @@ public class MarkerWrapper extends Basic
     }
 
     @Override
-    public org.apache.logging.log4j.Marker getParent() {
+    public Marker getParent() {
         return this.parent;
     }
 
     @Override
-    public boolean isInstanceOf(final org.apache.logging.log4j.Marker marker) {
+    public boolean isInstanceOf(final Marker marker) {
         if (marker == null) {
             throw new IllegalArgumentException("A marker parameter is required");
         }

Modified: logging/log4j/log4j2/trunk/log4j-taglib/src/main/java/org/apache/logging/log4j/taglib/Log4jTaglibLogger.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-taglib/src/main/java/org/apache/logging/log4j/taglib/Log4jTaglibLogger.java?rev=1566249&r1=1566248&r2=1566249&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-taglib/src/main/java/org/apache/logging/log4j/taglib/Log4jTaglibLogger.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-taglib/src/main/java/org/apache/logging/log4j/taglib/Log4jTaglibLogger.java
Sun Feb  9 07:47:17 2014
@@ -30,7 +30,7 @@ import org.apache.logging.log4j.spi.Abst
 class Log4jTaglibLogger extends AbstractLoggerWrapper {
     private static final long serialVersionUID = 1L;
 
-	public Log4jTaglibLogger(final AbstractLogger logger, final String name, final MessageFactory
messageFactory) {
+    public Log4jTaglibLogger(final AbstractLogger logger, final String name, final MessageFactory
messageFactory) {
         super(logger, name, messageFactory);
     }
 

Modified: logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLogger.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLogger.java?rev=1566249&r1=1566248&r2=1566249&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLogger.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLogger.java
Sun Feb  9 07:47:17 2014
@@ -31,7 +31,7 @@ import org.slf4j.spi.LocationAwareLogger
 public class SLF4JLogger extends AbstractLogger {
 
     private static final long serialVersionUID = 1L;
-	private final org.slf4j.Logger logger;
+    private final org.slf4j.Logger logger;
     private final LocationAwareLogger locationAwareLogger;
 
     public SLF4JLogger(final String name, final org.slf4j.Logger logger) {

Modified: logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLoggerContextFactory.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLoggerContextFactory.java?rev=1566249&r1=1566248&r2=1566249&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLoggerContextFactory.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLoggerContextFactory.java
Sun Feb  9 07:47:17 2014
@@ -20,11 +20,13 @@ import java.net.URI;
 
 import org.apache.logging.log4j.spi.LoggerContext;
 import org.apache.logging.log4j.spi.LoggerContextFactory;
+import org.apache.logging.log4j.status.StatusLogger;
 
 /**
  *
  */
 public class SLF4JLoggerContextFactory implements LoggerContextFactory {
+    private static final StatusLogger LOGGER = StatusLogger.getLogger();
     private static LoggerContext context = new SLF4JLoggerContext();
 
     public SLF4JLoggerContextFactory() {
@@ -34,7 +36,7 @@ public class SLF4JLoggerContextFactory i
             Class.forName("org.slf4j.helpers.Log4jLoggerFactory");
             misconfigured = true;
         } catch (final ClassNotFoundException classNotFoundIsGood) {
-            // org.slf4j.helpers.Log4jLoggerFactory is not on classpath. Good!
+            LOGGER.debug("org.slf4j.helpers.Log4jLoggerFactory is not on classpath. Good!");
         }
         if (misconfigured) {
             throw new IllegalStateException("slf4j-impl jar is mutually exclusive with log4j-to-slf4j
jar "



Mime
View raw message