Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to split log files

 
Mats Nilsson
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!

First, hi all. I'm a newbie both to Jboss and to this forum.

I'm trying to tell Jboss to split my logfiles in order to get more managable sizes, but with no luck. In my jboss-log4j.xml i have both the DailyRollingFileAppender

and then the RollingFileAppender:


But it won't split at 5MB! I tried disabling the first (the daily one), but still no luck. I also tried renaming the =${jboss.server.log.dir}/server.log" just to se that the log file got the new name, i.e. that the xml-tag is read and it was. Hence my question, why doesn't my log file split at 5MB? What am i overlooking/missing?

Thanks in advance

/Mats
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You cannot have two appenders with the same name, if you do, one of them will not take. Delete the one defined as DailyRollingFileAppender.

We cover this exact topic in the book in section 2.2.1.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic