logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Re: svn commit: r439188 - /logging/log4j/trunk/src/java/org/apache/log4j/rolling/TimeBasedRollingPolicy.java
Date Fri, 01 Sep 2006 16:22:23 GMT
On Sep 1, 2006, at 9:53 AM, Claudio Corsi wrote:

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


When responding to a bug report, I typically try to keep the changes  
to the minimum necessary to resolve the problem.  In this case, all I  
needed to change was one integer literal.  Your suggestion would  
definitely scale better that the original if more suffixes were  
added.  But I don't see any compelling reason to switch at this time.



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