logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claudio Corsi <cco...@progress.com>
Subject Re: svn commit: r439188 - /logging/log4j/trunk/src/java/org/apache/log4j/rolling/TimeBasedRollingPolicy.java
Date Fri, 01 Sep 2006 14:53:48 GMT
Curt,

Would you consider changing this to use a String array such that it 
calls the length method to set the suffixLength. For example,

  String suffixs[] = { ".gz", ".zip" };

  for(int idx = 0 ; idx < suffixs.length ; idx++ ) {
	if( lastFileName.endsWith(suffixs[idx]) {
            suffixLenth = suffixs[idx].length;
	   break;
  	}
  }

--Claudio

carnold@apache.org wrote:
> Author: carnold
> Date: Thu Aug 31 22:28:39 2006
> New Revision: 439188
> 
> URL: http://svn.apache.org/viewvc?rev=439188&view=rev
> Log:
> Bug 39994: TimeBasedRollingPolicy misidentifies .zip files as .gz
> 
> Modified:
>     logging/log4j/trunk/src/java/org/apache/log4j/rolling/TimeBasedRollingPolicy.java
> 
> Modified: logging/log4j/trunk/src/java/org/apache/log4j/rolling/TimeBasedRollingPolicy.java
> URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/java/org/apache/log4j/rolling/TimeBasedRollingPolicy.java?rev=439188&r1=439187&r2=439188&view=diff
> ==============================================================================
> --- logging/log4j/trunk/src/java/org/apache/log4j/rolling/TimeBasedRollingPolicy.java
(original)
> +++ logging/log4j/trunk/src/java/org/apache/log4j/rolling/TimeBasedRollingPolicy.java
Thu Aug 31 22:28:39 2006
> @@ -184,7 +184,7 @@
>      if (lastFileName.endsWith(".gz")) {
>        suffixLength = 3;
>      } else if (lastFileName.endsWith(".zip")) {
> -      suffixLength = 3;
> +      suffixLength = 4;
>      }
>    }
>  
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
> 


---------------------------------------------------------------------
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