logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sde...@apache.org
Subject svn commit: r1448515 - /logging/chainsaw/trunk/src/main/java/org/apache/log4j/varia/LogFilePatternReceiver.java
Date Thu, 21 Feb 2013 05:29:20 GMT
Author: sdeboy
Date: Thu Feb 21 05:29:20 2013
New Revision: 1448515

URL: http://svn.apache.org/r1448515
Log:
Remove optional leading and trailing spaces around LEVEL and LOGGER definitions

Supports parsing of log entries where the start of the entry is a right-aligned level

Modified:
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/varia/LogFilePatternReceiver.java

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/varia/LogFilePatternReceiver.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/varia/LogFilePatternReceiver.java?rev=1448515&r1=1448514&r2=1448515&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/varia/LogFilePatternReceiver.java
(original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/varia/LogFilePatternReceiver.java
Thu Feb 21 05:29:20 2013
@@ -157,7 +157,8 @@ public class LogFilePatternReceiver exte
   private static final String REGEXP_DEFAULT_WILDCARD = ".*?";
   private static final String REGEXP_GREEDY_WILDCARD = ".*";
   private static final String PATTERN_WILDCARD = "*";
-  private static final String NOSPACE_GROUP = "(\\S*\\s*?)";
+  //pull in optional leading and trailing spaces
+  private static final String NOSPACE_GROUP = "(\\s*?\\S*?\\s*?)";
   private static final String DEFAULT_GROUP = "(" + REGEXP_DEFAULT_WILDCARD + ")";
   private static final String GREEDY_GROUP = "(" + REGEXP_GREEDY_WILDCARD + ")";
   private static final String MULTIPLE_SPACES_REGEXP = "[ ]+";



Mime
View raw message