This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what is wrong with log4j configration

 
sam bartl
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Pie
Posts: 20750
30
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic