[logback-dev] svn commit: r2383 - in logback/trunk/logback-core/src: main/java/ch/qos/logback/core/rolling main/java/ch/qos/logback/core/rolling/helper test/java/ch/qos/logback/core/rolling/helper
noreply.ceki at qos.ch
noreply.ceki at qos.ch
Thu Jul 30 19:00:08 CEST 2009
Author: ceki
Date: Thu Jul 30 19:00:08 2009
New Revision: 2383
Modified:
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/DefaultTimeBasedFileNamingAndTriggeringPolicy.java
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/SizeAndTimeBasedFileNamingAndTriggeringPolicy.java
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/TimeBasedFileNamingAndTriggeringPolicyBase.java
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/helper/FileNamePattern.java
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/helper/TimeBasedCleaner.java
logback/trunk/logback-core/src/test/java/ch/qos/logback/core/rolling/helper/FileNamePatternTest.java
Log:
Removed convertDate method in FileNamePattern
Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/DefaultTimeBasedFileNamingAndTriggeringPolicy.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/DefaultTimeBasedFileNamingAndTriggeringPolicy.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/DefaultTimeBasedFileNamingAndTriggeringPolicy.java Thu Jul 30 19:00:08 2009
@@ -21,7 +21,7 @@
if (time >= nextCheck) {
Date dateInElapsedPeriod = dateInCurrentPeriod;
elapsedPeriodsFileName = tbrp.fileNamePatternWCS
- .convertDate(dateInElapsedPeriod);
+ .convert(dateInElapsedPeriod);
updateDateInCurrentPeriod(time);
computeNextCheck();
return true;
Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/SizeAndTimeBasedFileNamingAndTriggeringPolicy.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/SizeAndTimeBasedFileNamingAndTriggeringPolicy.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/SizeAndTimeBasedFileNamingAndTriggeringPolicy.java Thu Jul 30 19:00:08 2009
@@ -27,7 +27,7 @@
if (time >= nextCheck) {
Date dateInElapsedPeriod = dateInCurrentPeriod;
elapsedPeriodsFileName = tbrp.fileNamePatternWCS
- .convertDate(dateInElapsedPeriod);
+ .convert(dateInElapsedPeriod);
updateDateInCurrentPeriod(time);
computeNextCheck();
return true;
Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/TimeBasedFileNamingAndTriggeringPolicyBase.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/TimeBasedFileNamingAndTriggeringPolicyBase.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/TimeBasedFileNamingAndTriggeringPolicyBase.java Thu Jul 30 19:00:08 2009
@@ -79,7 +79,7 @@
}
public String getCurrentPeriodsFileNameWithoutCompressionSuffix() {
- return tbrp.fileNamePatternWCS.convertDate(dateInCurrentPeriod);
+ return tbrp.fileNamePatternWCS.convert(dateInCurrentPeriod);
}
Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/helper/FileNamePattern.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/helper/FileNamePattern.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/helper/FileNamePattern.java Thu Jul 30 19:00:08 2009
@@ -128,10 +128,6 @@
return convert(integerArg);
}
- public String convertDate(Date date) {
- return convert(date);
- }
-
public void setPattern(String pattern) {
if (pattern != null) {
// Trailing spaces in the pattern are assumed to be undesired.
Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/helper/TimeBasedCleaner.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/helper/TimeBasedCleaner.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/helper/TimeBasedCleaner.java Thu Jul 30 19:00:08 2009
@@ -30,7 +30,7 @@
public void clean(Date now) {
Date date2delete = rc.getRelativeDate(now, numberOfPeriods);
- String filename = fileNamePattern.convertDate(date2delete);
+ String filename = fileNamePattern.convert(date2delete);
File file2Delete = new File(filename);
Modified: logback/trunk/logback-core/src/test/java/ch/qos/logback/core/rolling/helper/FileNamePatternTest.java
==============================================================================
--- logback/trunk/logback-core/src/test/java/ch/qos/logback/core/rolling/helper/FileNamePatternTest.java (original)
+++ logback/trunk/logback-core/src/test/java/ch/qos/logback/core/rolling/helper/FileNamePatternTest.java Thu Jul 30 19:00:08 2009
@@ -83,13 +83,13 @@
FileNamePattern pp = new FileNamePattern("foo%d{yyyy.MM.dd}", context);
- assertEquals("foo2003.05.20", pp.convertDate(cal.getTime()));
+ assertEquals("foo2003.05.20", pp.convert(cal.getTime()));
pp = new FileNamePattern("foo%d{yyyy.MM.dd HH:mm}", context);
- assertEquals("foo2003.05.20 17:55", pp.convertDate(cal.getTime()));
+ assertEquals("foo2003.05.20 17:55", pp.convert(cal.getTime()));
pp = new FileNamePattern("%d{yyyy.MM.dd HH:mm} foo", context);
- assertEquals("2003.05.20 17:55 foo", pp.convertDate(cal.getTime()));
+ assertEquals("2003.05.20 17:55 foo", pp.convert(cal.getTime()));
}
More information about the logback-dev
mailing list