This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes create two log files using log4j.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "create two log files using log4j.xml" Watch "create two log files using log4j.xml" New topic

create two log files using log4j.xml

anji anji

Joined: Nov 12, 2006
Posts: 2
I have two java applications running in single JBOSS server.I want to create two different log files for two applications.
How to mention properties in log4j.xml to create different log files.

any body help in this..
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17271

in the log4j.xml file in the conf directory you can create another Appender mapped to a particular app, and have that go to one file, and create another pointing to another file for the other app. At this point it is a question of how this is done for Log4j, than a specific JBoss question.


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: create two log files using log4j.xml
It's not a secret anymore!