[logback-dev] [GIT] Logback: the generic, reliable, fast and flexible logging framework. branch, master, updated. v_0.9.23-2-ge666c7d
added by portage for gitosis-gentoo
git-noreply at pixie.qos.ch
Wed Jun 30 22:24:45 CEST 2010
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Logback: the generic, reliable, fast and flexible logging framework.".
The branch, master has been updated
via e666c7d8a37ebd144995b6c2d1da8597ce422167 (commit)
from 221874c02ece52940b244c2794d934d92b669658 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.qos.ch/gitweb/?p=logback.git;a=commit;h=e666c7d8a37ebd144995b6c2d1da8597ce422167
http://github.com/ceki/logback/commit/e666c7d8a37ebd144995b6c2d1da8597ce422167
commit e666c7d8a37ebd144995b6c2d1da8597ce422167
Author: Ceki Gulcu <ceki at qos.ch>
Date: Wed Jun 30 22:19:06 2010 +0200
- preparing release 0.9.24
- Fixed Fixed issue with SizeAndTimeBasedFNATP in presence of
application stop/restart and non-null file proprety as reported in
LBCORE-131.
diff --git a/logback-access/pom.xml b/logback-access/pom.xml
index 02c95cc..69eead3 100644
--- a/logback-access/pom.xml
+++ b/logback-access/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-parent</artifactId>
- <version>0.9.24-SNAPSHOT</version>
+ <version>0.9.24</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/logback-classic/pom.xml b/logback-classic/pom.xml
index 02d14f4..e12d0a6 100644
--- a/logback-classic/pom.xml
+++ b/logback-classic/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-parent</artifactId>
- <version>0.9.24-SNAPSHOT</version>
+ <version>0.9.24</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/logback-classic/src/main/java/ch/qos/logback/classic/helpers/MDCInsertingServletFilter.java b/logback-classic/src/main/java/ch/qos/logback/classic/helpers/MDCInsertingServletFilter.java
index 280086a..0dbd3d5 100644
--- a/logback-classic/src/main/java/ch/qos/logback/classic/helpers/MDCInsertingServletFilter.java
+++ b/logback-classic/src/main/java/ch/qos/logback/classic/helpers/MDCInsertingServletFilter.java
@@ -30,10 +30,10 @@ import ch.qos.logback.classic.ClassicConstants;
/**
* A servlet filter that inserts various values retrieved from the incoming http
* request into the MDC.
- *
- * <p>
+ * <p/>
+ * <p/>
* The values are removed after the request is processed.
- *
+ *
* @author Ceki Gülcü
*/
public class MDCInsertingServletFilter implements Filter {
@@ -43,41 +43,35 @@ public class MDCInsertingServletFilter implements Filter {
}
public void doFilter(ServletRequest request, ServletResponse response,
- FilterChain chain) throws IOException, ServletException {
+ FilterChain chain) throws IOException, ServletException {
insertIntoMDC(request);
-
try {
chain.doFilter(request, response);
} finally {
- System.out.println("*********** clearMDC()");
clearMDC();
}
}
void insertIntoMDC(ServletRequest request) {
-
MDC.put(ClassicConstants.REQUEST_REMOTE_HOST_MDC_KEY, request
- .getRemoteHost());
+ .getRemoteHost());
if (request instanceof HttpServletRequest) {
HttpServletRequest httpServletRequest = (HttpServletRequest) request;
-
- System.out.println("Inserting into MDC "+httpServletRequest.getRequestURL());
-
MDC.put(ClassicConstants.REQUEST_REQUEST_URI, httpServletRequest
- .getRequestURI());
+ .getRequestURI());
StringBuffer requestURL = httpServletRequest.getRequestURL();
if (requestURL != null) {
MDC.put(ClassicConstants.REQUEST_REQUEST_URL, requestURL.toString());
}
MDC.put(ClassicConstants.REQUEST_QUERY_STRING, httpServletRequest.getQueryString());
MDC.put(ClassicConstants.REQUEST_USER_AGENT_MDC_KEY, httpServletRequest
- .getHeader("User-Agent"));
+ .getHeader("User-Agent"));
MDC.put(ClassicConstants.REQUEST_X_FORWARDED_FOR, httpServletRequest
- .getHeader("X-Forwarded-For"));
+ .getHeader("X-Forwarded-For"));
}
}
diff --git a/logback-classic/src/main/java/ch/qos/logback/classic/sift/MDCBasedDiscriminator.java b/logback-classic/src/main/java/ch/qos/logback/classic/sift/MDCBasedDiscriminator.java
index 7098ac6..f1196d6 100644
--- a/logback-classic/src/main/java/ch/qos/logback/classic/sift/MDCBasedDiscriminator.java
+++ b/logback-classic/src/main/java/ch/qos/logback/classic/sift/MDCBasedDiscriminator.java
@@ -20,17 +20,18 @@ import ch.qos.logback.core.sift.Discriminator;
import ch.qos.logback.core.spi.ContextAwareBase;
import ch.qos.logback.core.util.OptionHelper;
+import java.util.Map;
+
/**
* MDCBasedDiscriminator essentially returns the value mapped to an MDC key. If
* the said value is null, then a default value is returned.
- *
+ * <p/>
* <p>Both Key and the DefaultValue are user specified properties.
- *
+ *
* @author Ceki Gülcü
- *
*/
public class MDCBasedDiscriminator extends ContextAwareBase implements
- Discriminator<ILoggingEvent> {
+ Discriminator<ILoggingEvent> {
private String key;
private String defaultValue;
@@ -46,7 +47,11 @@ public class MDCBasedDiscriminator extends ContextAwareBase implements
*/
public String getDiscriminatingValue(ILoggingEvent event) {
// http://jira.qos.ch/browse/LBCLASSIC-213
- String mdcValue = event.getMdc().get(key);
+ Map<String, String> mdcMap = event.getMdc();
+ if (mdcMap == null) {
+ return defaultValue;
+ }
+ String mdcValue = mdcMap.get(key);
if (mdcValue == null) {
return defaultValue;
} else {
@@ -86,8 +91,8 @@ public class MDCBasedDiscriminator extends ContextAwareBase implements
}
/**
- * @see #setDefaultValue(String)
* @return
+ * @see #setDefaultValue(String)
*/
public String getDefaultValue() {
return defaultValue;
@@ -96,11 +101,11 @@ public class MDCBasedDiscriminator extends ContextAwareBase implements
/**
* The default MDC value in case the MDC is not set for
* {@link #setKey(String) mdcKey}.
- *
+ * <p/>
* <p> For example, if {@link #setKey(String) Key} is set to the value
* "someKey", and the MDC is not set for "someKey", then this appender will
* use the default value, which you can set with the help of this method.
- *
+ *
* @param defaultValue
*/
public void setDefaultValue(String defaultValue) {
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/sift/MDCBasedDiscriminatorTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/sift/MDCBasedDiscriminatorTest.java
new file mode 100644
index 0000000..685a1a3
--- /dev/null
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/sift/MDCBasedDiscriminatorTest.java
@@ -0,0 +1,78 @@
+/**
+ * Logback: the reliable, generic, fast and flexible logging framework.
+ * Copyright (C) 1999-2010, QOS.ch. All rights reserved.
+ *
+ * This program and the accompanying materials are dual-licensed under
+ * either the terms of the Eclipse Public License v1.0 as published by
+ * the Eclipse Foundation
+ *
+ * or (per the licensee's choosing)
+ *
+ * under the terms of the GNU Lesser General Public License version 2.1
+ * as published by the Free Software Foundation.
+ */
+package ch.qos.logback.classic.sift;
+
+import ch.qos.logback.classic.Level;
+import ch.qos.logback.classic.Logger;
+import ch.qos.logback.classic.LoggerContext;
+
+import ch.qos.logback.classic.spi.LoggingEvent;
+import ch.qos.logback.core.testUtil.RandomUtil;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import org.slf4j.MDC;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * @author Ceki Gücü
+ */
+public class MDCBasedDiscriminatorTest {
+
+ static String DEFAULT_VAL = "DEFAULT_VAL";
+
+ MDCBasedDiscriminator discriminator = new MDCBasedDiscriminator();
+ LoggerContext context = new LoggerContext();
+ Logger logger = context.getLogger(this.getClass());
+
+ int diff = RandomUtil.getPositiveInt();
+ String key = "k" + diff;
+ String value = "val" + diff;
+ LoggingEvent event;
+
+ @Before
+ public void setUp() {
+ discriminator.setContext(context);
+ discriminator.setKey(key);
+ discriminator.setDefaultValue(DEFAULT_VAL);
+ discriminator.start();
+ assertTrue(discriminator.isStarted());
+ }
+
+ @After
+ public void teaDown() {
+ MDC.clear();
+ }
+
+ @Test
+ public void smoke() {
+ MDC.put(key, value);
+ event = new LoggingEvent("a", logger, Level.DEBUG, "", null, null);
+
+ String discriminatorValue = discriminator.getDiscriminatingValue(event);
+ assertEquals(value, discriminatorValue);
+ }
+
+ @Test
+ public void nullMDC() {
+ event = new LoggingEvent("a", logger, Level.DEBUG, "", null, null);
+ assertNull(event.getMdc());
+ String discriminatorValue = discriminator.getDiscriminatingValue(event);
+ assertEquals(DEFAULT_VAL, discriminatorValue);
+ }
+}
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/sift/PackageTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/sift/PackageTest.java
index 3637912..8eb6cd9 100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/sift/PackageTest.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/sift/PackageTest.java
@@ -18,6 +18,6 @@ import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
@RunWith(Suite.class)
- at SuiteClasses({SiftingAppenderTest.class})
+ at SuiteClasses({MDCBasedDiscriminatorTest.class, SiftingAppenderTest.class})
public class PackageTest {
}
\ No newline at end of file
diff --git a/logback-core/pom.xml b/logback-core/pom.xml
index 60fdd36..feb7671 100644
--- a/logback-core/pom.xml
+++ b/logback-core/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-parent</artifactId>
- <version>0.9.24-SNAPSHOT</version>
+ <version>0.9.24</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/logback-core/src/main/java/ch/qos/logback/core/rolling/SizeAndTimeBasedFNATP.java b/logback-core/src/main/java/ch/qos/logback/core/rolling/SizeAndTimeBasedFNATP.java
index 887ad29..a1916b1 100644
--- a/logback-core/src/main/java/ch/qos/logback/core/rolling/SizeAndTimeBasedFNATP.java
+++ b/logback-core/src/main/java/ch/qos/logback/core/rolling/SizeAndTimeBasedFNATP.java
@@ -23,7 +23,7 @@ import ch.qos.logback.core.util.FileSize;
@NoAutoStart
public class SizeAndTimeBasedFNATP<E> extends
- TimeBasedFileNamingAndTriggeringPolicyBase<E> {
+ TimeBasedFileNamingAndTriggeringPolicyBase<E> {
int currentPeriodsCounter = 0;
FileSize maxFileSize;
@@ -37,15 +37,16 @@ public class SizeAndTimeBasedFNATP<E> extends
archiveRemover = new SizeAndTimeBasedArchiveRemover(tbrp.fileNamePattern, rc);
archiveRemover.setContext(context);
-
+
// we need to get the correct value of currentPeriodsCounter.
// usually the value is 0, unless the appender or the application
// is stopped and restarted within the same period
- if (tbrp.getParentsRawFileProperty() == null) {
- String regex = tbrp.fileNamePattern.toRegex(dateInCurrentPeriod);
- String stemRegex = FileFilterUtil.afterLastSlash(regex);
- computeCurrentPeriodsHighestCounterValue(stemRegex);
- }
+ String regex = tbrp.fileNamePattern.toRegex(dateInCurrentPeriod);
+ String stemRegex = FileFilterUtil.afterLastSlash(regex);
+
+
+ computeCurrentPeriodsHighestCounterValue(stemRegex);
+
started = true;
}
@@ -54,42 +55,50 @@ public class SizeAndTimeBasedFNATP<E> extends
File parentDir = file.getParentFile();
File[] matchingFileArray = FileFilterUtil
- .filesInFolderMatchingStemRegex(parentDir, stemRegex);
+ .filesInFolderMatchingStemRegex(parentDir, stemRegex);
if (matchingFileArray == null || matchingFileArray.length == 0) {
+ currentPeriodsCounter = 0;
return;
}
FileFilterUtil.reverseSortFileArrayByName(matchingFileArray);
currentPeriodsCounter = FileFilterUtil.extractCounter(matchingFileArray[0], stemRegex);
+ if (tbrp.getParentsRawFileProperty() != null) {
+ currentPeriodsCounter++;
+ }
}
// IMPORTANT: This field can be updated by multiple threads. It follows that
// its values may *not* be incremented sequentially. However, we don't care
// about the actual value of the field except that from time to time the
- // expression (invocationCounter++ & 0xF) == 0xF) should be true.
+ // expression (invocationCounter++ & invocationMask) == invocationMask) should be true.
private int invocationCounter;
+ private int invocationMask = 0x1;
public boolean isTriggeringEvent(File activeFile, final E event) {
-
+
long time = getCurrentTime();
if (time >= nextCheck) {
Date dateInElapsedPeriod = dateInCurrentPeriod;
elapsedPeriodsFileName = tbrp.fileNamePatternWCS
- .convertMultipleArguments(dateInElapsedPeriod, currentPeriodsCounter);
+ .convertMultipleArguments(dateInElapsedPeriod, currentPeriodsCounter);
currentPeriodsCounter = 0;
setDateInCurrentPeriod(time);
computeNextCheck();
return true;
}
- // for performance reasons, check for changes every 16 invocations
- if (((invocationCounter++) & 0xF) != 0xF) {
+ // for performance reasons, check for changes every 16,invocationMask invocations
+ if (((++invocationCounter) & invocationMask) != invocationMask) {
return false;
}
+ if (invocationMask < 0x0F) {
+ invocationMask = (invocationMask << 1) + 1 ;
+ }
if (activeFile.length() >= maxFileSize.getSize()) {
elapsedPeriodsFileName = tbrp.fileNamePatternWCS
- .convertMultipleArguments(dateInCurrentPeriod, currentPeriodsCounter);
+ .convertMultipleArguments(dateInCurrentPeriod, currentPeriodsCounter);
currentPeriodsCounter++;
return true;
}
@@ -100,7 +109,7 @@ public class SizeAndTimeBasedFNATP<E> extends
@Override
public String getCurrentPeriodsFileNameWithoutCompressionSuffix() {
return tbrp.fileNamePatternWCS.convertMultipleArguments(
- dateInCurrentPeriod, currentPeriodsCounter);
+ dateInCurrentPeriod, currentPeriodsCounter);
}
public String getMaxFileSize() {
diff --git a/logback-core/src/main/java/ch/qos/logback/core/rolling/TimeBasedFileNamingAndTriggeringPolicyBase.java b/logback-core/src/main/java/ch/qos/logback/core/rolling/TimeBasedFileNamingAndTriggeringPolicyBase.java
index 55dd78e..d5d4129 100644
--- a/logback-core/src/main/java/ch/qos/logback/core/rolling/TimeBasedFileNamingAndTriggeringPolicyBase.java
+++ b/logback-core/src/main/java/ch/qos/logback/core/rolling/TimeBasedFileNamingAndTriggeringPolicyBase.java
@@ -22,7 +22,7 @@ import ch.qos.logback.core.rolling.helper.RollingCalendar;
import ch.qos.logback.core.spi.ContextAwareBase;
abstract public class TimeBasedFileNamingAndTriggeringPolicyBase<E> extends
- ContextAwareBase implements TimeBasedFileNamingAndTriggeringPolicy<E> {
+ ContextAwareBase implements TimeBasedFileNamingAndTriggeringPolicy<E> {
protected TimeBasedRollingPolicy<E> tbrp;
@@ -46,28 +46,27 @@ abstract public class TimeBasedFileNamingAndTriggeringPolicyBase<E> extends
DateTokenConverter dtc = tbrp.fileNamePattern.getDateTokenConverter();
if (dtc == null) {
throw new IllegalStateException("FileNamePattern ["
- + tbrp.fileNamePattern.getPattern()
- + "] does not contain a valid DateToken");
+ + tbrp.fileNamePattern.getPattern()
+ + "] does not contain a valid DateToken");
}
rc = new RollingCalendar();
rc.init(dtc.getDatePattern());
addInfo("The date pattern is '" + dtc.getDatePattern()
- + "' from file name pattern '" + tbrp.fileNamePattern.getPattern()
- + "'.");
+ + "' from file name pattern '" + tbrp.fileNamePattern.getPattern()
+ + "'.");
rc.printPeriodicity(this);
-
- if (dateInCurrentPeriod == null) {
- setDateInCurrentPeriod(new Date(getCurrentTime()));
-
- if (tbrp.getParentsRawFileProperty() != null) {
- File currentFile = new File(tbrp.getParentsRawFileProperty());
- if (currentFile.exists() && currentFile.canRead()) {
- setDateInCurrentPeriod(new Date(currentFile.lastModified()));
- }
+
+ setDateInCurrentPeriod(new Date(getCurrentTime()));
+ if (tbrp.getParentsRawFileProperty() != null) {
+ File currentFile = new File(tbrp.getParentsRawFileProperty());
+ if (currentFile.exists() && currentFile.canRead()) {
+ setDateInCurrentPeriod(new Date(currentFile.lastModified()));
}
}
+
+ addInfo("Setting initial period to " + dateInCurrentPeriod);
computeNextCheck();
}
diff --git a/logback-core/src/main/java/ch/qos/logback/core/rolling/TimeBasedRollingPolicy.java b/logback-core/src/main/java/ch/qos/logback/core/rolling/TimeBasedRollingPolicy.java
index ec13f36..16be2a8 100644
--- a/logback-core/src/main/java/ch/qos/logback/core/rolling/TimeBasedRollingPolicy.java
+++ b/logback-core/src/main/java/ch/qos/logback/core/rolling/TimeBasedRollingPolicy.java
@@ -50,7 +50,7 @@ public class TimeBasedRollingPolicy<E> extends RollingPolicyBase implements
private int maxHistory = NO_DELETE_HISTORY;
private ArchiveRemover archiveRemover;
- TimeBasedFileNamingAndTriggeringPolicy<E> timeBasedTriggering;
+ TimeBasedFileNamingAndTriggeringPolicy<E> timeBasedFileNamingAndTriggeringPolicy;
public void start() {
// set the LR for our utility object
@@ -77,29 +77,29 @@ public class TimeBasedRollingPolicy<E> extends RollingPolicyBase implements
addInfo("Will use the pattern " + fileNamePatternWCS
+ " for the active file");
- if (timeBasedTriggering == null) {
- timeBasedTriggering = new DefaultTimeBasedFileNamingAndTriggeringPolicy<E>();
+ if (timeBasedFileNamingAndTriggeringPolicy == null) {
+ timeBasedFileNamingAndTriggeringPolicy = new DefaultTimeBasedFileNamingAndTriggeringPolicy<E>();
}
- timeBasedTriggering.setContext(context);
- timeBasedTriggering.setTimeBasedRollingPolicy(this);
- timeBasedTriggering.start();
+ timeBasedFileNamingAndTriggeringPolicy.setContext(context);
+ timeBasedFileNamingAndTriggeringPolicy.setTimeBasedRollingPolicy(this);
+ timeBasedFileNamingAndTriggeringPolicy.start();
// the maxHistory property is given to TimeBasedRollingPolicy instead of to
// the TimeBasedFileNamingAndTriggeringPolicy. This makes it more convenient
// for the user at the cost of inconsistency at the level of this code.
if (maxHistory != NO_DELETE_HISTORY) {
- archiveRemover = timeBasedTriggering.getArchiveRemover();
+ archiveRemover = timeBasedFileNamingAndTriggeringPolicy.getArchiveRemover();
archiveRemover.setMaxHistory(maxHistory);
}
}
public void setTimeBasedFileNamingAndTriggeringPolicy(
TimeBasedFileNamingAndTriggeringPolicy<E> timeBasedTriggering) {
- this.timeBasedTriggering = timeBasedTriggering;
+ this.timeBasedFileNamingAndTriggeringPolicy = timeBasedTriggering;
}
public TimeBasedFileNamingAndTriggeringPolicy<E> getTimeBasedFileNamingAndTriggeringPolicy() {
- return timeBasedTriggering;
+ return timeBasedFileNamingAndTriggeringPolicy;
}
static public String computeFileNameStr_WCS(String fileNamePatternStr,
@@ -121,7 +121,7 @@ public class TimeBasedRollingPolicy<E> extends RollingPolicyBase implements
// when rollover is called the elapsed period's file has
// been already closed. This is a working assumption of this method.
- String elapsedPeriodsFileName = timeBasedTriggering
+ String elapsedPeriodsFileName = timeBasedFileNamingAndTriggeringPolicy
.getElapsedPeriodsFileName();
if (compressionMode == CompressionMode.NONE) {
@@ -137,7 +137,7 @@ public class TimeBasedRollingPolicy<E> extends RollingPolicyBase implements
}
if (archiveRemover != null) {
- archiveRemover.clean(new Date(timeBasedTriggering.getCurrentTime()));
+ archiveRemover.clean(new Date(timeBasedFileNamingAndTriggeringPolicy.getCurrentTime()));
}
}
@@ -180,13 +180,13 @@ public class TimeBasedRollingPolicy<E> extends RollingPolicyBase implements
if (parentsRawFileProperty != null) {
return parentsRawFileProperty;
} else {
- return timeBasedTriggering
+ return timeBasedFileNamingAndTriggeringPolicy
.getCurrentPeriodsFileNameWithoutCompressionSuffix();
}
}
public boolean isTriggeringEvent(File activeFile, final E event) {
- return timeBasedTriggering.isTriggeringEvent(activeFile, event);
+ return timeBasedFileNamingAndTriggeringPolicy.isTriggeringEvent(activeFile, event);
}
/**
diff --git a/logback-core/src/test/java/ch/qos/logback/core/AllCoreTest.java b/logback-core/src/test/java/ch/qos/logback/core/AllCoreTest.java
index fc3618e..1e7cc80 100644
--- a/logback-core/src/test/java/ch/qos/logback/core/AllCoreTest.java
+++ b/logback-core/src/test/java/ch/qos/logback/core/AllCoreTest.java
@@ -30,6 +30,7 @@ import org.junit.runners.Suite.SuiteClasses;
ch.qos.logback.core.sift.PackageTest.class,
ch.qos.logback.core.encoder.PackageTest.class,
ch.qos.logback.core.recovery.PackageTest.class})
-public class AllCoreTest {
+public class
+ AllCoreTest {
}
diff --git a/logback-core/src/test/java/ch/qos/logback/core/rolling/SizeAndTimeBasedFNATP_Test.java b/logback-core/src/test/java/ch/qos/logback/core/rolling/SizeAndTimeBasedFNATP_Test.java
index 5a0bffc..44dbe58 100644
--- a/logback-core/src/test/java/ch/qos/logback/core/rolling/SizeAndTimeBasedFNATP_Test.java
+++ b/logback-core/src/test/java/ch/qos/logback/core/rolling/SizeAndTimeBasedFNATP_Test.java
@@ -14,15 +14,18 @@
package ch.qos.logback.core.rolling;
+import java.io.File;
import java.util.Date;
+import ch.qos.logback.core.status.InfoStatus;
+import ch.qos.logback.core.status.StatusManager;
import org.junit.Before;
import org.junit.Test;
import ch.qos.logback.core.util.StatusPrinter;
public class SizeAndTimeBasedFNATP_Test extends
- ScaffoldingForRollingTests {
+ ScaffoldingForRollingTests {
SizeAndTimeBasedFNATP<Object> sizeAndTimeBasedFNATP;
RollingFileAppender<Object> rfa1 = new RollingFileAppender<Object>();
@@ -31,6 +34,8 @@ public class SizeAndTimeBasedFNATP_Test extends
RollingFileAppender<Object> rfa2 = new RollingFileAppender<Object>();
TimeBasedRollingPolicy<Object> tbrp2 = new TimeBasedRollingPolicy<Object>();
+ StatusManager sm = context.getStatusManager();
+
int fileSize = 0;
int fileIndexCounter = 0;
int sizeThreshold;
@@ -50,8 +55,8 @@ public class SizeAndTimeBasedFNATP_Test extends
}
void initTRBP(RollingFileAppender<Object> rfa,
- TimeBasedRollingPolicy<Object> tbrp, String filenamePattern,
- int sizeThreshold, long givenTime, long lastCheck) {
+ TimeBasedRollingPolicy<Object> tbrp, String filenamePattern,
+ int sizeThreshold, long givenTime, long lastCheck) {
sizeAndTimeBasedFNATP = new SizeAndTimeBasedFNATP<Object>();
tbrp.setContext(context);
@@ -59,7 +64,7 @@ public class SizeAndTimeBasedFNATP_Test extends
tbrp.setTimeBasedFileNamingAndTriggeringPolicy(sizeAndTimeBasedFNATP);
tbrp.setFileNamePattern(filenamePattern);
tbrp.setParent(rfa);
- tbrp.timeBasedTriggering.setCurrentTime(givenTime);
+ tbrp.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(givenTime);
// if (lastCheck != 0) {
// tbrp.timeBasedTriggering.setDateInCurrentPeriod(new Date(lastCheck));
// }
@@ -75,13 +80,13 @@ public class SizeAndTimeBasedFNATP_Test extends
initRFA(rfa1, file);
sizeThreshold = 300;
initTRBP(rfa1, tbrp1, randomOutputDir + testId + "-%d{"
- + DATE_PATTERN_WITH_SECONDS + "}-%i.txt", sizeThreshold, currentTime, 0);
+ + DATE_PATTERN_WITH_SECONDS + "}-%i.txt", sizeThreshold, currentTime, 0);
addExpectedFileName(testId, getDateOfCurrentPeriodsStart(),
- fileIndexCounter, false);
+ fileIndexCounter, false);
incCurrentTime(100);
- tbrp1.timeBasedTriggering.setCurrentTime(currentTime);
+ tbrp1.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(currentTime);
int runLength = 100;
String prefix = "Hello -----------------";
@@ -91,7 +96,7 @@ public class SizeAndTimeBasedFNATP_Test extends
rfa1.doAppend(msg);
addExpectedFileNamedIfItsTime(testId, msg, false);
incCurrentTime(20);
- tbrp1.timeBasedTriggering.setCurrentTime(currentTime);
+ tbrp1.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(currentTime);
}
massageExpectedFilesToCorresponToCurrentTarget(file);
@@ -105,13 +110,13 @@ public class SizeAndTimeBasedFNATP_Test extends
initRFA(rfa1, null);
sizeThreshold = 300;
initTRBP(rfa1, tbrp1, randomOutputDir + testId + "-%d{"
- + DATE_PATTERN_WITH_SECONDS + "}-%i.txt", sizeThreshold, currentTime, 0);
+ + DATE_PATTERN_WITH_SECONDS + "}-%i.txt", sizeThreshold, currentTime, 0);
addExpectedFileName(testId, getDateOfCurrentPeriodsStart(),
- fileIndexCounter, false);
+ fileIndexCounter, false);
incCurrentTime(100);
- tbrp1.timeBasedTriggering.setCurrentTime(currentTime);
+ tbrp1.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(currentTime);
int runLength = 100;
String prefix = "Hello -----------------";
@@ -121,7 +126,7 @@ public class SizeAndTimeBasedFNATP_Test extends
rfa1.doAppend(msg);
addExpectedFileNamedIfItsTime(testId, msg, false);
incCurrentTime(20);
- tbrp1.timeBasedTriggering.setCurrentTime(currentTime);
+ tbrp1.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(currentTime);
}
existenceCheck(expectedFilenameList);
sortedContentCheck(randomOutputDir, runLength, prefix);
@@ -133,30 +138,30 @@ public class SizeAndTimeBasedFNATP_Test extends
initRFA(rfa1, null);
sizeThreshold = 300;
initTRBP(rfa1, tbrp1, randomOutputDir + testId + "-%d{"
- + DATE_PATTERN_WITH_SECONDS + "}-%i.txt", sizeThreshold, currentTime, 0);
+ + DATE_PATTERN_WITH_SECONDS + "}-%i.txt", sizeThreshold, currentTime, 0);
addExpectedFileName(testId, getDateOfCurrentPeriodsStart(),
- fileIndexCounter, false);
+ fileIndexCounter, false);
incCurrentTime(100);
- tbrp1.timeBasedTriggering.setCurrentTime(currentTime);
+ tbrp1.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(currentTime);
int runLength = 100;
String prefix = "Hello -----------------";
-
+
int i = 0;
-
+
for (; i < runLength; i++) {
String msg = prefix + i;
rfa1.doAppend(msg);
addExpectedFileNamedIfItsTime(testId, msg, false);
incCurrentTime(20);
- tbrp1.timeBasedTriggering.setCurrentTime(currentTime);
+ tbrp1.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(currentTime);
}
rfa1.stop();
initRFA(rfa2, null);
initTRBP(rfa2, tbrp2, randomOutputDir + testId + "-%d{"
- + DATE_PATTERN_WITH_SECONDS + "}-%i.txt", sizeThreshold, currentTime, 0);
+ + DATE_PATTERN_WITH_SECONDS + "}-%i.txt", sizeThreshold, currentTime, 0);
runLength *= 2;
for (; i < runLength; i++) {
@@ -164,15 +169,66 @@ public class SizeAndTimeBasedFNATP_Test extends
addExpectedFileNamedIfItsTime(testId, msg, false);
rfa2.doAppend(msg);
incCurrentTime(100);
- tbrp2.timeBasedTriggering.setCurrentTime(currentTime);
+ tbrp2.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(currentTime);
}
StatusPrinter.print(context);
existenceCheck(expectedFilenameList);
sortedContentCheck(randomOutputDir, runLength, prefix);
}
-
-
-
+
+ @Test
+ public void noCompression_FileSet_WithStopStart_4() throws Exception {
+ String testId = "test4";
+ String file = randomOutputDir + testId + ".log";
+ initRFA(rfa1, file);
+ sizeThreshold = 300;
+ initTRBP(rfa1, tbrp1, randomOutputDir + testId + "-%d{"
+ + DATE_PATTERN_WITH_SECONDS + "}-%i.txt", sizeThreshold, currentTime, 0);
+
+ incCurrentTime(100);
+ tbrp1.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(currentTime);
+
+
+ String prefix = "Hello -----------------";
+
+ int runLength = 100;
+ int i = 0;
+
+ for (; i < runLength; i++) {
+ incCurrentTime(20);
+ tbrp1.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(currentTime);
+ String msg = prefix + i;
+ rfa1.doAppend(msg);
+ addExpectedFileNamedIfItsTime(testId, msg, false);
+
+ }
+ rfa1.stop();
+
+ File f = new File(file);
+ f.setLastModified(currentTime);
+
+ sm.add(new InfoStatus("Time when rfa1 is stopped: " + new Date(currentTime), this));
+ sm.add(new InfoStatus("currentTime%1000=" + (currentTime % 1000), this));
+
+ initRFA(rfa2, file);
+ initTRBP(rfa2, tbrp2, randomOutputDir + testId + "-%d{"
+ + DATE_PATTERN_WITH_SECONDS + "}-%i.txt", sizeThreshold, currentTime, 0);
+
+ runLength *= 2;
+ for (; i < runLength; i++) {
+ incCurrentTime(100);
+ tbrp2.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(currentTime);
+ String msg = prefix + i;
+ addExpectedFileNamedIfItsTime(testId, msg, false);
+ rfa2.doAppend(msg);
+ }
+ StatusPrinter.print(context);
+ massageExpectedFilesToCorresponToCurrentTarget(file);
+ sortedContentCheck(randomOutputDir, runLength, prefix);
+ existenceCheck(expectedFilenameList);
+ }
+
+
void massageExpectedFilesToCorresponToCurrentTarget(String file) {
// we added one too many files by date
expectedFilenameList.remove(expectedFilenameList.size() - 1);
@@ -180,14 +236,14 @@ public class SizeAndTimeBasedFNATP_Test extends
}
void addExpectedFileNamedIfItsTime(String testId, String msg,
- boolean gzExtension) {
+ boolean gzExtension) {
fileSize += msg.getBytes().length;
if (passThresholdTime(nextRolloverThreshold)) {
fileIndexCounter = 0;
fileSize = 0;
addExpectedFileName(testId, getDateOfCurrentPeriodsStart(),
- fileIndexCounter, gzExtension);
+ fileIndexCounter, gzExtension);
recomputeRolloverThreshold(currentTime);
return;
}
@@ -196,20 +252,21 @@ public class SizeAndTimeBasedFNATP_Test extends
// fileIndexCounter 0 and 1
if ((fileIndexCounter < 1) && fileSize > sizeThreshold) {
addExpectedFileName(testId, getDateOfCurrentPeriodsStart(),
- ++fileIndexCounter, gzExtension);
+ ++fileIndexCounter, gzExtension);
fileSize = 0;
return;
}
}
void addExpectedFileName(String testId, Date date, int fileIndexCounter,
- boolean gzExtension) {
+ boolean gzExtension) {
String fn = randomOutputDir + testId + "-" + SDF.format(date) + "-"
- + fileIndexCounter + ".txt";
+ + fileIndexCounter + ".txt";
if (gzExtension) {
fn += ".gz";
}
+ sm.add(new InfoStatus("xx Adding " + fn, this));
expectedFilenameList.add(fn);
}
diff --git a/logback-core/src/test/java/ch/qos/logback/core/rolling/TimeBasedRollingTest.java b/logback-core/src/test/java/ch/qos/logback/core/rolling/TimeBasedRollingTest.java
index f918e73..2cf9201 100644
--- a/logback-core/src/test/java/ch/qos/logback/core/rolling/TimeBasedRollingTest.java
+++ b/logback-core/src/test/java/ch/qos/logback/core/rolling/TimeBasedRollingTest.java
@@ -18,7 +18,6 @@ import static org.junit.Assert.assertTrue;
import java.io.File;
import ch.qos.logback.core.testUtil.RandomUtil;
-import ch.qos.logback.core.util.StatusPrinter;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -79,8 +78,8 @@ public class TimeBasedRollingTest extends ScaffoldingForRollingTests {
tbrp.setContext(context);
tbrp.setFileNamePattern(filenamePattern);
tbrp.setParent(rfa);
- tbrp.timeBasedTriggering = new DefaultTimeBasedFileNamingAndTriggeringPolicy<Object>();
- tbrp.timeBasedTriggering.setCurrentTime(givenTime);
+ tbrp.timeBasedFileNamingAndTriggeringPolicy = new DefaultTimeBasedFileNamingAndTriggeringPolicy<Object>();
+ tbrp.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(givenTime);
rfa.setRollingPolicy(tbrp);
tbrp.start();
rfa.start();
@@ -100,13 +99,13 @@ public class TimeBasedRollingTest extends ScaffoldingForRollingTests {
addExpectedFileName_ByDate(randomOutputDir, testId, getDateOfCurrentPeriodsStart(), false);
incCurrentTime(1100);
- tbrp1.timeBasedTriggering.setCurrentTime(currentTime);
+ tbrp1.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(currentTime);
for (int i = 0; i < 3; i++) {
rfa1.doAppend("Hello---" + i);
addExpectedFileNamedIfItsTime_ByDate(randomOutputDir, testId, false);
incCurrentTime(500);
- tbrp1.timeBasedTriggering.setCurrentTime(currentTime);
+ tbrp1.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(currentTime);
}
int i = 0;
@@ -128,14 +127,14 @@ public class TimeBasedRollingTest extends ScaffoldingForRollingTests {
addExpectedFileName_ByDate(randomOutputDir, testId, getDateOfCurrentPeriodsStart(), true);
incCurrentTime(1100);
- tbrp1.timeBasedTriggering.setCurrentTime(currentTime);
+ tbrp1.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(currentTime);
for (int i = 0; i < 3; i++) {
// when i == 2, file name should not have .gz extension
addExpectedFileNamedIfItsTime_ByDate(randomOutputDir, testId, i != 2);
rfa1.doAppend("Hello---" + i);
incCurrentTime(500);
- tbrp1.timeBasedTriggering.setCurrentTime(currentTime);
+ tbrp1.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(currentTime);
waitForCompression(tbrp1);
}
@@ -162,27 +161,27 @@ public class TimeBasedRollingTest extends ScaffoldingForRollingTests {
addExpectedFileName_ByDate(randomOutputDir, testId, getDateOfCurrentPeriodsStart(), false);
incCurrentTime(1100);
- tbrp1.timeBasedTriggering.setCurrentTime(currentTime);
+ tbrp1.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(currentTime);
for (int i = 0; i <= 2; i++) {
rfa1.doAppend("Hello---" + i);
addExpectedFileNamedIfItsTime_ByDate(randomOutputDir, testId, false);
incCurrentTime(500);
- tbrp1.timeBasedTriggering.setCurrentTime(currentTime);
+ tbrp1.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(currentTime);
}
rfa1.stop();
initRFA(rfa2, null);
initTRBP(rfa2, tbrp2, randomOutputDir + testId + "-%d{"
- + DATE_PATTERN_WITH_SECONDS + "}", tbrp1.timeBasedTriggering
+ + DATE_PATTERN_WITH_SECONDS + "}", tbrp1.timeBasedFileNamingAndTriggeringPolicy
.getCurrentTime());
for (int i = 0; i <= 2; i++) {
addExpectedFileNamedIfItsTime_ByDate(randomOutputDir, testId, false);
rfa2.doAppend("World---" + i);
incCurrentTime(100);
- tbrp2.timeBasedTriggering.setCurrentTime(currentTime);
+ tbrp2.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(currentTime);
}
int i = 0;
@@ -205,13 +204,13 @@ public class TimeBasedRollingTest extends ScaffoldingForRollingTests {
addExpectedFileName_ByDate(randomOutputDir, testId, getDateOfCurrentPeriodsStart(), false);
incCurrentTime(1100);
- tbrp1.timeBasedTriggering.setCurrentTime(currentTime);
+ tbrp1.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(currentTime);
for (int i = 0; i <= 2; i++) {
rfa1.doAppend("Hello---" + i);
addExpectedFileNamedIfItsTime_ByDate(randomOutputDir, testId, false);
incCurrentTime(500);
- tbrp1.timeBasedTriggering.setCurrentTime(currentTime);
+ tbrp1.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(currentTime);
}
rfa1.stop();
@@ -228,7 +227,7 @@ public class TimeBasedRollingTest extends ScaffoldingForRollingTests {
rfa2.doAppend("World---" + i);
addExpectedFileNamedIfItsTime_ByDate(randomOutputDir, testId, false);
incCurrentTime(100);
- tbrp2.timeBasedTriggering.setCurrentTime(currentTime);
+ tbrp2.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(currentTime);
}
massageExpectedFilesToCorresponToCurrentTarget("test4.log");
@@ -251,13 +250,13 @@ public class TimeBasedRollingTest extends ScaffoldingForRollingTests {
addExpectedFileName_ByDate(randomOutputDir, testId, getDateOfCurrentPeriodsStart(), false);
incCurrentTime(1100);
- tbrp1.timeBasedTriggering.setCurrentTime(currentTime);
+ tbrp1.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(currentTime);
for (int i = 0; i <= 2; i++) {
rfa1.doAppend("Hello---" + i);
addExpectedFileNamedIfItsTime_ByDate(randomOutputDir, testId, false);
incCurrentTime(500);
- tbrp1.timeBasedTriggering.setCurrentTime(currentTime);
+ tbrp1.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(currentTime);
}
rfa1.stop();
@@ -276,7 +275,7 @@ public class TimeBasedRollingTest extends ScaffoldingForRollingTests {
rfa2.doAppend("World---" + i);
addExpectedFileNamedIfItsTime_ByDate(randomOutputDir, testId, false);
incCurrentTime(100);
- tbrp2.timeBasedTriggering.setCurrentTime(currentTime);
+ tbrp2.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(currentTime);
}
massageExpectedFilesToCorresponToCurrentTarget("test4B.log");
@@ -303,13 +302,13 @@ public class TimeBasedRollingTest extends ScaffoldingForRollingTests {
addExpectedFileName_ByDate(randomOutputDir, testId, getDateOfCurrentPeriodsStart(), false);
incCurrentTime(1100);
- tbrp1.timeBasedTriggering.setCurrentTime(currentTime);
+ tbrp1.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(currentTime);
for (int i = 0; i < 3; i++) {
rfa1.doAppend("Hello---" + i);
addExpectedFileNamedIfItsTime_ByDate(randomOutputDir, testId, false);
incCurrentTime(500);
- tbrp1.timeBasedTriggering.setCurrentTime(currentTime);
+ tbrp1.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(currentTime);
}
massageExpectedFilesToCorresponToCurrentTarget("test5.log");
@@ -336,13 +335,13 @@ public class TimeBasedRollingTest extends ScaffoldingForRollingTests {
addExpectedFileName_ByDate(randomOutputDir, testId, getDateOfCurrentPeriodsStart(), true);
incCurrentTime(1100);
- tbrp1.timeBasedTriggering.setCurrentTime(currentTime);
+ tbrp1.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(currentTime);
for (int i = 0; i < 3; i++) {
rfa1.doAppend("Hello---" + i);
addExpectedFileNamedIfItsTime_ByDate(randomOutputDir, testId, true);
incCurrentTime(500);
- tbrp1.timeBasedTriggering.setCurrentTime(currentTime);
+ tbrp1.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(currentTime);
waitForCompression(tbrp1);
}
@@ -373,13 +372,13 @@ public class TimeBasedRollingTest extends ScaffoldingForRollingTests {
addExpectedFileName_ByDate(randomTargetDir, testId, getDateOfCurrentPeriodsStart(), false);
incCurrentTime(1100);
- tbrp1.timeBasedTriggering.setCurrentTime(currentTime);
+ tbrp1.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(currentTime);
for (int i = 0; i < 3; i++) {
rfa1.doAppend("Hello---" + i);
addExpectedFileNamedIfItsTime_ByDate(randomTargetDir, testId, false);
incCurrentTime(500);
- tbrp1.timeBasedTriggering.setCurrentTime(currentTime);
+ tbrp1.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(currentTime);
}
massageExpectedFilesToCorresponToCurrentTarget("missingTargetDir.log");
int i = 0;
diff --git a/logback-core/src/test/java/ch/qos/logback/core/rolling/TimeBasedRollingWithArchiveRemovalTest.java b/logback-core/src/test/java/ch/qos/logback/core/rolling/TimeBasedRollingWithArchiveRemovalTest.java
index f034a3d..f32b13f 100644
--- a/logback-core/src/test/java/ch/qos/logback/core/rolling/TimeBasedRollingWithArchiveRemovalTest.java
+++ b/logback-core/src/test/java/ch/qos/logback/core/rolling/TimeBasedRollingWithArchiveRemovalTest.java
@@ -182,8 +182,8 @@ public class TimeBasedRollingWithArchiveRemovalTest {
tbrp.setMaxHistory(maxHistory);
tbrp.setParent(rfa);
- tbrp.timeBasedTriggering = tbfnatp;
- tbrp.timeBasedTriggering.setCurrentTime(currentTime);
+ tbrp.timeBasedFileNamingAndTriggeringPolicy = tbfnatp;
+ tbrp.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(currentTime);
tbrp.start();
rfa.setRollingPolicy(tbrp);
rfa.start();
@@ -196,7 +196,7 @@ public class TimeBasedRollingWithArchiveRemovalTest {
rfa
.doAppend("Hello ----------------------------------------------------------"
+ i);
- tbrp.timeBasedTriggering.setCurrentTime(addTime(tbrp.timeBasedTriggering
+ tbrp.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(addTime(tbrp.timeBasedFileNamingAndTriggeringPolicy
.getCurrentTime(), periodDurationInMillis / ticksPerPeriod));
// wait every now and then for the compression job
diff --git a/logback-examples/pom.xml b/logback-examples/pom.xml
index 5e603e6..1471494 100644
--- a/logback-examples/pom.xml
+++ b/logback-examples/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-parent</artifactId>
- <version>0.9.24-SNAPSHOT</version>
+ <version>0.9.24</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/logback-site/pom.xml b/logback-site/pom.xml
index 6fea3a7..2b4c2d0 100644
--- a/logback-site/pom.xml
+++ b/logback-site/pom.xml
@@ -3,7 +3,7 @@
<parent>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-parent</artifactId>
- <version>0.9.24-SNAPSHOT</version>
+ <version>0.9.24</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/logback-site/src/site/pages/news.html b/logback-site/src/site/pages/news.html
index 459abc4..1e636a1 100644
--- a/logback-site/src/site/pages/news.html
+++ b/logback-site/src/site/pages/news.html
@@ -28,6 +28,19 @@
<hr width="80%" align="center" />
+ <h3>June 30th, 2010 - Release of version 0.9.24</h3>
+
+ <p>Fixed NullPointerException thrown by
+ <code>MDCBasedDiscriminator</code> in case the MDC map is
+ null.</p>
+
+ <p>Fixed issue with <code>SizeAndTimeBasedFNATP</code> in presence
+ of application stop/restart and non-null file proprety. This issue
+ was reported by Tom Liu in <a
+ href="http://jira.qos.ch/browse/LBCORE-131">LBCORE-131</a>.</p>
+
+ <hr width="80%" align="center" />
+
<h3>June 29th, 2010 - Release of version 0.9.23</h3>
<p>Fixed Groovy runtime dependency problem with
@@ -36,7 +49,7 @@
href="http://jira.qos.ch/browse/LBCLASSIC-214">LBCLASSIC-214</a>
by Alvin Chee.</p>
- <p>Fixed MDCBasedDiscriminator so that it supports deferred
+ <p>Fixed <code>MDCBasedDiscriminator</code> so that it supports deferred
processing. This issue was reported in <a
href="http://jira.qos.ch/browse/LBCLASSIC-213">LBCLASSIC-213</a>
by Torsten Juergeleit.</p>
diff --git a/pom.xml b/pom.xml
index 217b304..4e2d024 100755
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
<groupId>ch.qos.logback</groupId>
<artifactId>logback-parent</artifactId>
- <version>0.9.24-SNAPSHOT</version>
+ <version>0.9.24</version>
<packaging>pom</packaging>
<name>Logback-Parent</name>
-----------------------------------------------------------------------
Summary of changes:
logback-access/pom.xml | 2 +-
logback-classic/pom.xml | 2 +-
.../classic/helpers/MDCInsertingServletFilter.java | 22 ++---
.../classic/sift/MDCBasedDiscriminator.java | 21 +++--
.../classic/sift/MDCBasedDiscriminatorTest.java | 78 ++++++++++++++
.../ch/qos/logback/classic/sift/PackageTest.java | 2 +-
logback-core/pom.xml | 2 +-
.../core/rolling/SizeAndTimeBasedFNATP.java | 39 ++++---
...TimeBasedFileNamingAndTriggeringPolicyBase.java | 27 +++---
.../core/rolling/TimeBasedRollingPolicy.java | 26 +++---
.../test/java/ch/qos/logback/core/AllCoreTest.java | 3 +-
.../core/rolling/SizeAndTimeBasedFNATP_Test.java | 113 +++++++++++++++-----
.../logback/core/rolling/TimeBasedRollingTest.java | 45 ++++----
.../TimeBasedRollingWithArchiveRemovalTest.java | 6 +-
logback-examples/pom.xml | 2 +-
logback-site/pom.xml | 2 +-
logback-site/src/site/pages/news.html | 15 +++-
pom.xml | 2 +-
18 files changed, 282 insertions(+), 127 deletions(-)
create mode 100644 logback-classic/src/test/java/ch/qos/logback/classic/sift/MDCBasedDiscriminatorTest.java
hooks/post-receive
--
Logback: the generic, reliable, fast and flexible logging framework.
More information about the logback-dev
mailing list