You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rg...@apache.org on 2021/11/20 17:45:13 UTC

[logging-log4j2] branch release-2.x updated (5bbb05c -> 7a56e74)

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

rgoers pushed a change to branch release-2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git.


    from 5bbb05c  Merge branch 'mseele-feature/LOG4J2-2978' into release-2.x
     new cd7f2a2  Fix the number of {}-placeholders in the string literal argument does not match the number of other arguments to the logging call.
     new 7a56e74  LOG4J2-3110 - Add changes.xml entry

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:
 .../main/java/org/apache/logging/log4j/core/net/TcpSocketManager.java | 2 +-
 .../logging/log4j/core/net/ssl/AbstractKeyStoreConfiguration.java     | 2 +-
 .../main/java/org/apache/logging/log4j/core/util/OptionConverter.java | 2 +-
 .../org/apache/logging/log4j/flume/appender/Log4jEventSource.java     | 2 +-
 src/changes/changes.xml                                               | 4 ++++
 5 files changed, 8 insertions(+), 4 deletions(-)

[logging-log4j2] 02/02: LOG4J2-3110 - Add changes.xml entry

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

rgoers pushed a commit to branch release-2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit 7a56e74b8dc4b1e0548a82b65fcb5675c5cd1735
Author: Ralph Goers <rg...@apache.org>
AuthorDate: Sat Nov 20 10:42:27 2021 -0700

    LOG4J2-3110 - Add changes.xml entry
---
 src/changes/changes.xml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index b3339a5..08af2d2 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -107,6 +107,10 @@
         Improve PatternLayout performance by reducing unnecessary indirection and branching.
       </action>
       <!-- FIXES -->
+      <action issue="LOG4J2-3110" dev="rgoers" type="fix" due-to="Arturo Bernal">
+        Fix the number of {}-placeholders in the string literal argument does not match the number of other arguments
+        to the logging call.
+      </action>
       <action issue="LOG4J2-3060" dev="vy" type="fix" due-to=" Nikita Mikhailov">
         Fix thread-safety issues in DefaultErrorHandler.
       </action>

[logging-log4j2] 01/02: Fix the number of {}-placeholders in the string literal argument does not match the number of other arguments to the logging call.

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

rgoers pushed a commit to branch release-2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit cd7f2a216e40fa7c0e7996dd07bed3f03d071b24
Author: Arturo Bernal <ar...@gmail.com>
AuthorDate: Sat Jun 5 11:09:52 2021 +0200

    Fix the number of {}-placeholders in the string literal argument does not match the number of other arguments to the logging call.
---
 .../main/java/org/apache/logging/log4j/core/net/TcpSocketManager.java   | 2 +-
 .../logging/log4j/core/net/ssl/AbstractKeyStoreConfiguration.java       | 2 +-
 .../main/java/org/apache/logging/log4j/core/util/OptionConverter.java   | 2 +-
 .../java/org/apache/logging/log4j/flume/appender/Log4jEventSource.java  | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/net/TcpSocketManager.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/net/TcpSocketManager.java
index 17daa68..174b1e5 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/net/TcpSocketManager.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/net/TcpSocketManager.java
@@ -479,7 +479,7 @@ public class TcpSocketManager extends AbstractSocketManager {
                 os = socket.getOutputStream();
                 return createManager(name, os, socket, inetAddress, data);
             } catch (final IOException ex) {
-                LOGGER.error("TcpSocketManager ({}) caught exception and will continue:", name, ex, ex);
+                LOGGER.error("TcpSocketManager ({}) caught exception and will continue:", name, ex);
                 os = NullOutputStream.getInstance();
             }
             if (data.reconnectDelayMillis == 0) {
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/AbstractKeyStoreConfiguration.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/AbstractKeyStoreConfiguration.java
index a79a657..5d86c50 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/AbstractKeyStoreConfiguration.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/AbstractKeyStoreConfiguration.java
@@ -95,7 +95,7 @@ public class AbstractKeyStoreConfiguration extends StoreConfiguration<KeyStore>
             LOGGER.error("The keystore file {} is not found", loadLocation, e);
             throw new StoreConfigurationException(loadLocation, e);
         } catch (final IOException e) {
-            LOGGER.error("Something is wrong with the format of the keystore or the given password for location", loadLocation, e);
+            LOGGER.error("Something is wrong with the format of the keystore or the given password for location {}", loadLocation, e);
             throw new StoreConfigurationException(loadLocation, e);
         }
     }
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/util/OptionConverter.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/util/OptionConverter.java
index 7536ae8..7b9bc2b 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/util/OptionConverter.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/util/OptionConverter.java
@@ -297,7 +297,7 @@ public final class OptionConverter {
                     LOGGER.error("A \"{}\" object is not assignable to a \"{}\" variable.", className,
                         superClass.getName());
                     LOGGER.error("The class \"{}\" was loaded by [{}] whereas object of type [{}] was loaded by [{}].",
-                        superClass.getName(), superClass.getClassLoader(), classObj.getName());
+                        superClass.getName(), superClass.getClassLoader(), classObj.getTypeName(), classObj.getName());
                     return defaultValue;
                 }
                 return classObj.newInstance();
diff --git a/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/Log4jEventSource.java b/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/Log4jEventSource.java
index 7dd573c..806e753 100644
--- a/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/Log4jEventSource.java
+++ b/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/Log4jEventSource.java
@@ -58,7 +58,7 @@ public class Log4jEventSource extends AbstractSource implements EventDrivenSourc
         try {
             getChannelProcessor().processEvent(event);
         } catch (final ChannelException ex) {
-            LOGGER.warn("Unable to process event {}" + event, ex);
+            LOGGER.warn("Unable to process event {}", event, ex);
             throw ex;
         }
         sourceCounter.incrementAppendAcceptedCount();