سؤال

I am using log4qt with RollingFileAppender in my QT application. Everytime I restart my application logs are not appended to the log file, the file is simply overwritten. Below is my log4qt.properties file.

log4j.rootLogger = DEBUG, File
log4j.appender.File=org.apache.log4j.RollingFileAppender
log4j.appender.File.File=logs/log.out
log4j.appender.File.MaxFileSize=3072KB
log4j.appender.File.MaxBackupIndex=3
log4j.appender.File.layout=org.apache.log4j.PatternLayout
log4j.appender.File.layout.ConversionPattern=%d [%t] [%p] %m%n

I tried to add the append property log4j.appender.File.Append=true , but i got error Property 'append' does not exist.

هل كانت مفيدة؟

المحلول

By exploring the code, I myself figured out the property that needs to be configured for appending the logs to the file. The correct property is:

log4j.appender.File.AppendFile=true

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top