Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: pom.xml
- ===================================================================
- --- pom.xml (revision 1710268)
- +++ pom.xml (working copy)
- @@ -25,7 +25,7 @@
- <groupId>log4j</groupId>
- <artifactId>apache-log4j-extras</artifactId>
- <packaging>bundle</packaging>
- - <version>1.2.17</version>
- + <version>1.2.18-SNAPSHOT</version>
- <name>Apache Extras™ for Apache log4j™.</name>
- <description>
- This package provides additional appenders, filters and
- Index: src/main/java/org/apache/log4j/rolling/helper/FileRenameAction.java
- ===================================================================
- --- src/main/java/org/apache/log4j/rolling/helper/FileRenameAction.java (revision 1710268)
- +++ src/main/java/org/apache/log4j/rolling/helper/FileRenameAction.java (working copy)
- @@ -17,7 +17,10 @@
- package org.apache.log4j.rolling.helper;
- +import org.apache.log4j.helpers.LogLog;
- +
- import java.io.File;
- +import java.io.IOException;
- /**
- @@ -74,6 +77,17 @@
- public static boolean execute(
- final File source, final File destination, boolean renameEmptyFiles) {
- if (renameEmptyFiles || (source.length() > 0)) {
- + try {
- + final File newFile = new File(destination.getCanonicalPath());
- + final boolean dirCreated = newFile.getParentFile().mkdirs();
- + if (dirCreated) {
- + LogLog.debug("Successfully created directory path: " + newFile.getParentFile().toString());
- + } else {
- + LogLog.warn("Directory entries already existed or mkdirs() was denied to write directory path: " + newFile.getParentFile().toString());
- + }
- + } catch (IOException e) {
- + LogLog.error("Failed to created directory, reason: " + e.getMessage());
- + }
- return source.renameTo(destination);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement