Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Log4J log file size

Status
Not open for further replies.

murthypatnaik

Programmer
Feb 26, 2006
15
0
0
US
Hi,

I disabled the log file rotation as,
*************************************
log4j.appender.A2=org.apache.log4j.RollingFileAppender
//log4j.appender.A2.MaxFileSize=1000KB
//log4j.appender.A2.MaxBackupIndex=30
log4j.appender.A2.layout=org.apache.log4j.PatternLayout
log4j.appender.A2.layout.ConversionPattern=%-5p %d %x : [%c{1} - %m %x %n
*************************************

Even though I commented MaxFileSize, MaxBackupIndex, it is rolling over file for every 10MB. I don't want this rolling behavior. Please suggest me in this regard.

Thanks,
Murthy P
 
Have you restarted the application after the changes? Are you certain that this log4j.properties is the one which is seen by the Log4J library?

Tim
 
yes, this is the properties file which Log4J uses!

Anyway, I have figuredout the problem, as RollingFileAppender default max file size is 10mb, so it is rollingover for every 10mb.

Thanks,
Murthy P
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top