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 2020/07/28 06:33:52 UTC

[logging-log4j2] branch release-2.x updated: LOG4J2-2832: Updated strategy name to existing strategy `DirectFileRolloverStrategy`

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


The following commit(s) were added to refs/heads/release-2.x by this push:
     new 7d1aafc  LOG4J2-2832: Updated strategy name to existing strategy `DirectFileRolloverStrategy`
7d1aafc is described below

commit 7d1aafcdec4bd5aae5432f488795da86f6c54d8d
Author: Benjamin Asbach <as...@users.noreply.github.com>
AuthorDate: Mon Apr 27 11:52:34 2020 +0200

    LOG4J2-2832: Updated strategy name to existing strategy `DirectFileRolloverStrategy`
    
    Instead of using a hard coded name the class name of the interface was used which
    a) Increases visibility where the interface is referenced
    b) Prevents that the message needs to be adjusted when the interface name changes
---
 .../org/apache/logging/log4j/core/appender/RollingFileAppender.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/RollingFileAppender.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/RollingFileAppender.java
index 5fc2728..1f300a7 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/RollingFileAppender.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/RollingFileAppender.java
@@ -138,7 +138,7 @@ public final class RollingFileAppender extends AbstractOutputStreamAppender<Roll
                                         .build();
                 }
             } else if (fileName == null && !(strategy instanceof DirectFileRolloverStrategy)) {
-                LOGGER.error("RollingFileAppender '{}': When no file name is provided a DirectFilenameRolloverStrategy must be configured", getName());
+                LOGGER.error("RollingFileAppender '{}': When no file name is provided a {} must be configured", getName(), DirectFileRolloverStrategy.class.getSimpleName());
                 return null;
             }