I was wondering why my log4j logs weren't rotating as I had specified in my
properties until I found this:
================
private void internalInit( String logfile )
throws Exception
{
/*
* do it by our classname to avoid conflicting with anything else
* that might be used...
*/
logger = Category.getInstance(this.getClass().getName());
logger.setAdditivity(false);
/*
* Priority is set for DEBUG becouse this implementation checks
* log level.
*/
logger.setPriority(Priority.DEBUG);
RollingFileAppender appender = new RollingFileAppender( new
PatternLayout( "%d - %m%n"), logfile, true);
appender.setMaxBackupIndex( 1 );
appender.setMaximumFileSize( 100000 );
logger.addAppender(appender);
}
=================
Shouldn't this be using runtime.log.logsystem.log4j.file.size and
runtime.log.logsystem.log4j.file.backups instead of the hard-coded values of
1 and 100000? I'm puzzled by multiple messages to the user list by people
stating they've set these properties and they seem to work. I don't see how
they could be.
Could someone please enlighten me? If this is a bug then I can submit a
patch (although it would probably be quicker for one of the existing
developers to patch).
Let me know please.
thanks,
walt
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>