From 4a1fc3adf5ac13f775587bb51d147d5f07a4eb55 Mon Sep 17 00:00:00 2001 From: James Perkins Date: Wed, 16 Aug 2017 16:03:01 -0700 Subject: [PATCH] [LOGMGR-160] Correct the JavaDoc that indicates files will not be deleted on rotation if the suffix is used. --- .../jboss/logmanager/handlers/SizeRotatingFileHandler.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/jboss/logmanager/handlers/SizeRotatingFileHandler.java b/src/main/java/org/jboss/logmanager/handlers/SizeRotatingFileHandler.java index 8e41b953..1c36c9e1 100644 --- a/src/main/java/org/jboss/logmanager/handlers/SizeRotatingFileHandler.java +++ b/src/main/java/org/jboss/logmanager/handlers/SizeRotatingFileHandler.java @@ -217,8 +217,11 @@ public String getSuffix() { *

* If the suffix ends with {@code .gz} or {@code .zip} the file will be compressed on rotation. *

- * Note: Any files rotated with the suffix appended will not be deleted. The {@link #setMaxBackupIndex(int) - * maxBackupIndex} is not used for files with a suffix. + *

+ * Note: The {@link #setMaxBackupIndex(int) maxBackupIndex} only takes into account files rotated with same + * suffix. For example if the suffix pattern is {@code .yyyy-MM-dd} and the size rotation is reached only files + * with the same date suffix will be purged. A file the day before or after will not be purged. + *

* * @param suffix the suffix to place after the filename when the file is rotated */