Some locales represent simpledateformatted-text with characters other than alpha/numeric (dot in French locales for the month)..use /S when building the pattern that can parse the timestamp format instead of /w to account for that situation
git-svn-id: https://svn.apache.org/repos/asf/logging/log4j/companions/receivers/trunk@980277 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/java/org/apache/log4j/varia/LogFilePatternReceiver.java b/src/main/java/org/apache/log4j/varia/LogFilePatternReceiver.java
index 78f71c1..a1643b7 100644
--- a/src/main/java/org/apache/log4j/varia/LogFilePatternReceiver.java
+++ b/src/main/java/org/apache/log4j/varia/LogFilePatternReceiver.java
@@ -600,7 +600,9 @@
* @return string
*/
private String convertTimestamp() {
- return util.substitute("s/("+VALID_DATEFORMAT_CHAR_PATTERN+")+/\\\\w+/g", timestampFormat);
+ //some locales (for example, French) generate timestamp text with characters not included in \w -
+ // now using \S (all non-whitespace characters) instead of /w
+ return util.substitute("s/("+VALID_DATEFORMAT_CHAR_PATTERN+")+/\\\\S+/g", timestampFormat);
}
protected void setHost(String host) {