Repository: logging-log4j2 Updated Branches: refs/heads/master 7e47aecc8 -> 5a5b7d453
[LOG4J2-1168] Add getters for source and destination file in file rename action. Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/5a5b7d45 Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/5a5b7d45 Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/5a5b7d45 Branch: refs/heads/master Commit: 5a5b7d4536861a32690574bd4044828d211da112 Parents: 7e47aec Author: ggregory <ggreg...@apache.org> Authored: Fri Oct 23 18:18:07 2015 -0700 Committer: ggregory <ggreg...@apache.org> Committed: Fri Oct 23 18:18:07 2015 -0700 ---------------------------------------------------------------------- .../rolling/action/FileRenameAction.java | 25 ++++++++++++++++++++ src/changes/changes.xml | 3 +++ 2 files changed, 28 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/5a5b7d45/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/FileRenameAction.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/FileRenameAction.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/FileRenameAction.java index f45cd01..f5f0849 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/FileRenameAction.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/FileRenameAction.java @@ -64,6 +64,30 @@ public class FileRenameAction extends AbstractAction { } /** + * Gets the destination. + * @return the destination. + */ + public File getDestination() { + return this.destination; + } + + /** + * Whether to rename empty files. If true, rename empty files, otherwise delete empty files. + * @return Whether to rename empty files. + */ + public boolean getRenameEmptyFiles() { + return renameEmptyFiles; + } + + /** + * Gets the source. + * @return the source. + */ + public File getSource() { + return this.source; + } + + /** * Rename file. * * @param source current file name. @@ -127,4 +151,5 @@ public class FileRenameAction extends AbstractAction { return FileRenameAction.class.getSimpleName() + '[' + source + " to " + destination // + ", renameEmptyFiles=" + renameEmptyFiles + ']'; } + } http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/5a5b7d45/src/changes/changes.xml ---------------------------------------------------------------------- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index a5d73c5..f297d2c 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -44,6 +44,9 @@ <action issue="LOG4J2-1136" dev="rgoers" type="add"> Add support for JSR 223 scripts in filters and the PatternSelector. </action> + <action issue="LOG4J2-1168" dev="ggregory" type="add" due-to="Steven Swor"> + Add getters for source and destination file in file rename action. + </action> <action issue="LOG4J2-1166" dev="rpopma" type="fix"> AbstractConfiguration executor should use a DaemonThreadFactory. </action>