Hi,

I'm new to this mailing list and relatively new to log4j too. We've want to
use the RollingFileAppender to help roll over the log files after every
10MB. Towards this I have set up the properties like this:

log4j.rootCategory=debug,com.company.DBManager

log4j.category.com.company.DBManager=debug,com.company.DBManager

log4j.additivity.com.company.DBManager=false

log4j.appender.com.company.DBManager.File=d:/st/sdk/logs/sdk.log
log4j.appender.com.company.DBManager=org.apache.log4j.RollingFileAppender
log4j.appender.com.company.DBManager.MaxFileSize=10KB
log4j.appender.com.company.DBManager.MaxBackupIndex=2
log4j.appender.com.company.DBManager.layout=org.apache.log4j.PatternLayout
log4j.appender.com.company.DBManager.layout.ConversionPattern=[%t][%d{dd MMM
HH:mm:ss}][%x][-%5p] - %m%n

The properties are read from a file into my java code:

                fstream = new FileInputStream(propertyFilename);
                Properties myProperties = new Properties();
                myProperties.load(fstream);
                PropertyConfigurator.configure(myProperties);

What happens is that the log file (sdk.log) keeps getting overwritten
without a backup being created at all. I've checked the mailing list for
other similar messages but this has never been a problem for anyone. Can you
tell me what I'm doing wrong?

thanks,
Manav


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to