You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rp...@apache.org on 2016/03/16 14:38:29 UTC

[12/50] logging-log4j2 git commit: LOG4J2-1160 AsyncLoggerDisruptor should not log status message at FATAL level when logging is attempted after the Disruptor was shut down (status message at WARN level instead)

LOG4J2-1160 AsyncLoggerDisruptor should not log status message at FATAL level when logging is attempted after the Disruptor was shut down (status message at WARN level instead)


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/3542dae3
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/3542dae3
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/3542dae3

Branch: refs/heads/LOG4J2-1278-gc-free-logger
Commit: 3542dae359052b5b0db75c4e4a7217ba7c910a4e
Parents: bf07950
Author: rpopma <rp...@apache.org>
Authored: Wed Mar 9 08:29:34 2016 +1100
Committer: rpopma <rp...@apache.org>
Committed: Wed Mar 9 08:29:34 2016 +1100

----------------------------------------------------------------------
 .../apache/logging/log4j/core/async/AsyncLoggerDisruptor.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/3542dae3/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerDisruptor.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerDisruptor.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerDisruptor.java
index c55e1c9..3da2b3e 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerDisruptor.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerDisruptor.java
@@ -179,7 +179,7 @@ class AsyncLoggerDisruptor {
          */
     private boolean hasLog4jBeenShutDown(final Disruptor<RingBufferLogEvent> aDisruptor) {
         if (aDisruptor == null) { // LOG4J2-639
-            LOGGER.error("Ignoring log event after log4j was shut down");
+            LOGGER.warn("Ignoring log event after log4j was shut down");
             return true;
         }
         return false;
@@ -193,7 +193,7 @@ class AsyncLoggerDisruptor {
             // was shut down, which could cause the publishEvent method to hang and never return.
             disruptor.publishEvent(translator);
         } catch (final NullPointerException npe) {
-            LOGGER.error("[{}] Ignoring log event after log4j was shut down.", contextName);
+            LOGGER.warn("[{}] Ignoring log event after log4j was shut down.", contextName);
         }
     }