logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sde...@apache.org
Subject cvs commit: logging-log4j/src/java/org/apache/log4j/varia LogFilePatternReceiver.java
Date Fri, 10 Sep 2004 21:20:08 GMT
sdeboy      2004/09/10 14:20:08

  Modified:    src/java/org/apache/log4j/varia LogFilePatternReceiver.java
  Log:
  A matcher can't be shared if you're going to call getmatch later
  
  Revision  Changes    Path
  1.18      +3 -2      logging-log4j/src/java/org/apache/log4j/varia/LogFilePatternReceiver.java
  
  Index: LogFilePatternReceiver.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/varia/LogFilePatternReceiver.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- LogFilePatternReceiver.java	10 Sep 2004 20:12:18 -0000	1.17
  +++ LogFilePatternReceiver.java	10 Sep 2004 21:20:08 -0000	1.18
  @@ -408,17 +408,18 @@
         throw new RuntimeException("Bad pattern: " + regexp);
       }
   
  +    Perl5Matcher eventMatcher = new Perl5Matcher(); 
       String line = null;
       do {
         while ((line = bufferedReader.readLine()) != null) {
  -        if (matcher.matches(line, regexpPattern)) {
  +        if (eventMatcher.matches(line, regexpPattern)) {
             LoggingEvent event = buildEvent();
             if (event != null) {
               if (passesExpression(event)) {
                 doPost(event);
               }
             }
  -          currentMap.putAll(processEvent(matcher.getMatch()));
  +          currentMap.putAll(processEvent(eventMatcher.getMatch()));
           } else {
             //may be an exception or additional message lines
             additionalLines.add(line);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message