You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by sd...@apache.org on 2004/07/09 06:54:28 UTC

cvs commit: logging-log4j/src/java/org/apache/log4j/varia LogFilePatternReceiver.java

sdeboy      2004/07/08 21:54:28

  Modified:    src/java/org/apache/log4j/chainsaw/help release-notes.html
               src/java/org/apache/log4j/varia LogFilePatternReceiver.java
  Log:
  Corrected a bug in LogFilePatternReceiver that prevented the processing of log files with delimited PROP entries.
  
  Revision  Changes    Path
  1.27      +5 -0      logging-log4j/src/java/org/apache/log4j/chainsaw/help/release-notes.html
  
  Index: release-notes.html
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/chainsaw/help/release-notes.html,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- release-notes.html	2 Jul 2004 05:49:27 -0000	1.26
  +++ release-notes.html	9 Jul 2004 04:54:28 -0000	1.27
  @@ -9,6 +9,11 @@
   
   <h1>1.99.99</h2>
   
  +<h2>8 July 2004</h2>
  +<ul>
  + <li>Corrected a bug in LogFilePatternReceiver that prevented the processing of log files with delimited PROP entries.  Thanks to Pranav Vora for reporting this.</li>
  +</ul>
  +
   <h2>1 July 2004</h2>
   <ul>
    <li>Selecting a node in the logger tree panel now colorizes the selected node and all child nodes. Disabled when 'focus on' is active or when the 'Root Logger' is selected.  Thanks to Eric Rath for the suggestion.</li>
  
  
  
  1.13      +5 -4      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.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- LogFilePatternReceiver.java	7 Jun 2004 20:10:05 -0000	1.12
  +++ LogFilePatternReceiver.java	9 Jul 2004 04:54:28 -0000	1.13
  @@ -216,7 +216,7 @@
       //parser.initialize();
       //System.out.println("Created event: " + parser.convertToEvent("2004-12-13 22:49:22,820 DEBUG SOME VALUE [Thread-0] Generator2 (Generator2.java:100) - <test>   <test2>something here</test2>   <test3 blah=something/>   <test4>       <test5>something else</test5>   </test4></test>"));
       //parser.initialize("THREAD LEVEL LOGGER - MESSAGE");
  -    parser.setLogFormat("RELATIVETIME PROP(USERID) [THREAD] LEVEL LOGGER * - MESSAGE");
  +    //parser.setLogFormat("RELATIVETIME PROP(USERID) [THREAD] LEVEL LOGGER * - MESSAGE");
       parser.setFileName(args[0]);
       parser.initialize();
   
  @@ -471,7 +471,7 @@
   
       for (int i = 0; i < logFormatFields.size(); i++) {
         String thisField = (String) logFormatFields.get(i);
  -      LogLog.info("processing field " + thisField);
  +      //LogLog.info("processing field " + thisField);
   
         //ignore wildcard entries - skip to next field
         if (thisField.equals(WILDCARD)) {
  @@ -717,6 +717,7 @@
           if (firstPart.length() > 0) {
             //System.out.println("ADDED FIRSTPART: " + firstPart);
             logFormatFields.add(firstPart);
  +          
           }
   
           logFormatFields.add(keyword);
  @@ -748,8 +749,8 @@
           return keyword;
         }
       }
  -    if (trimmedFragment.startsWith(PROP_PREFIX) && trimmedFragment.endsWith(PROP_SUFFIX)) {
  -    	return trimmedFragment;
  +    if ((trimmedFragment.indexOf(PROP_PREFIX)> -1) && trimmedFragment.endsWith(PROP_SUFFIX)) {
  +    	return trimmedFragment.substring(trimmedFragment.indexOf(PROP_PREFIX));
       }
   
       return null;
  
  
  

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