File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes what is wrong with log4j configration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "what is wrong with log4j configration" Watch "what is wrong with log4j configration" New topic
Author

what is wrong with log4j configration

sam bartl
Ranch Hand

Joined: Oct 29, 2010
Posts: 44
here is my log4j configration



I am assuming this configration will create one log file daily with a max size of 5Mb and if the log size exceeds it will create another new one.

but in server I noticed several log files with the size 3kb , 5kb etc. not even a single log file is of size 5Mb and a new log fileis created for every few minutes, please tell me what is wrong with my configration .
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18114
    
    8

Actually the API documentation for DailyRollingFileAppender is quite explicit about how it works. It starts out by saying
The rolling schedule is specified by the DatePattern option.

And then it goes on to explain exactly how that works. If you read it and then look at your choice for the DatePattern option you will see exactly why it is working the way it is.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what is wrong with log4j configration
 
Similar Threads
how to debug log4j
Unable to get logging working in Tomcat application
Log4j : specific class to log on FileAppender other classes log on Console Appender.
Capture logs to file via log4j.xml
log4j Asynchronous log message order