This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes Unable to split log files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Unable to split log files" Watch "Unable to split log files" New topic

Unable to split log files

Mats Nilsson

Joined: Jan 22, 2009
Posts: 1

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

Peter Johnson

Joined: May 14, 2008
Posts: 5852

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.

JBoss In Action
subject: Unable to split log files
It's not a secret anymore!