This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes Externalizing log4j.properties in JBoss 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 » JBoss/WildFly
Bookmark "Externalizing log4j.properties in JBoss" Watch "Externalizing log4j.properties in JBoss" New topic
Author

Externalizing log4j.properties in JBoss

Bala Gangadhar
Ranch Hand

Joined: Oct 07, 2008
Posts: 80
    
    1
Hi all,
I am using slf4j for logging in my application which is deployed in JBOSS.
Now i want to externalize the log4j.properties means i want to pull it out side of myapp.war.
So i have created a jar with log4j.propeties along with my application specific properties file and placed the jar in %JBOSS_HOME%/server/default/lib.
I am able to read the remaining configuration file in my application, but the JBOSS not considering the log4j.properties in this jar.
Is there any mistake in my approach?
I want the log4j.properties should be outside of myapp.war.Thats my goal...


Thanks and Regards,
Bala.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5772
    
    7

Logging in JBoss AS is governed by the server/xxx/conf/jboss-log4j.xml file. Usually, you should add your logging settings there.

For per-app log settings, see this:
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125552


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Externalizing log4j.properties in JBoss
 
Similar Threads
log4j.properties in jboss4.0.3
Porting WSAD 5.1.1 to MyEclipse 5.1 with JBOSS 4.0.5
How to set up Log4J.properties in JBoss 5.1.0?
Using your own log4j.properties file
Jboss can not recognize custom log4j.properties file