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 2022/04/16 02:48:42 UTC

[logging-log4j2] branch master updated (53009e0f31 -> c813616555)

This is an automated email from the ASF dual-hosted git repository.

rpopma pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git


    from 53009e0f31 LOG4J2-3477 Add the missing context stack to JsonLayout template. (#819)
     new 61e74bcbeb LOG4J2-3476 ignore JUL ApiLogger.setLevel without error
     new c813616555 LOG4J2-3476 ignore JUL ApiLogger.setLevel without error

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 log4j-jul/src/main/java/org/apache/logging/log4j/jul/ApiLogger.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)


[logging-log4j2] 01/02: LOG4J2-3476 ignore JUL ApiLogger.setLevel without error

Posted by rp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rpopma pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit 61e74bcbeb48cd06a33e29a1e7e73639e36fcba6
Author: Remko Popma <re...@yahoo.com>
AuthorDate: Thu Apr 14 19:37:34 2022 +0900

    LOG4J2-3476 ignore JUL ApiLogger.setLevel without error
---
 log4j-jul/src/main/java/org/apache/logging/log4j/jul/ApiLogger.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/log4j-jul/src/main/java/org/apache/logging/log4j/jul/ApiLogger.java b/log4j-jul/src/main/java/org/apache/logging/log4j/jul/ApiLogger.java
index 96512e670c..f4ac095155 100644
--- a/log4j-jul/src/main/java/org/apache/logging/log4j/jul/ApiLogger.java
+++ b/log4j-jul/src/main/java/org/apache/logging/log4j/jul/ApiLogger.java
@@ -27,6 +27,7 @@ import java.util.logging.Logger;
 import org.apache.logging.log4j.message.Message;
 import org.apache.logging.log4j.message.MessageFactory;
 import org.apache.logging.log4j.spi.ExtendedLogger;
+import org.apache.logging.log4j.status.StatusLogger;
 
 /**
  * Log4j API implementation of the JUL {@link Logger} class. <strong>Note that this implementation does
@@ -94,7 +95,8 @@ public class ApiLogger extends Logger {
 
     @Override
     public void setLevel(final Level newLevel) throws SecurityException {
-        throw new UnsupportedOperationException("Cannot set level through log4j-api");
+        StatusLogger.getLogger().error("Cannot set JUL log level through log4j-api: " +
+                "ignoring call to Logger.setLevel(" + newLevel + ")");
     }
 
     /**


[logging-log4j2] 02/02: LOG4J2-3476 ignore JUL ApiLogger.setLevel without error

Posted by rp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rpopma pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit c813616555b01e52b0893f4adcddddf049c915d3
Author: Remko Popma <re...@yahoo.com>
AuthorDate: Thu Apr 14 19:37:34 2022 +0900

    LOG4J2-3476 ignore JUL ApiLogger.setLevel without error
---
 log4j-jul/src/main/java/org/apache/logging/log4j/jul/ApiLogger.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/log4j-jul/src/main/java/org/apache/logging/log4j/jul/ApiLogger.java b/log4j-jul/src/main/java/org/apache/logging/log4j/jul/ApiLogger.java
index f4ac095155..ef0a907aa4 100644
--- a/log4j-jul/src/main/java/org/apache/logging/log4j/jul/ApiLogger.java
+++ b/log4j-jul/src/main/java/org/apache/logging/log4j/jul/ApiLogger.java
@@ -96,7 +96,7 @@ public class ApiLogger extends Logger {
     @Override
     public void setLevel(final Level newLevel) throws SecurityException {
         StatusLogger.getLogger().error("Cannot set JUL log level through log4j-api: " +
-                "ignoring call to Logger.setLevel(" + newLevel + ")");
+                "ignoring call to Logger.setLevel({})", newLevel);
     }
 
     /**