0

I have created a webapplication and deployed in jboss server.

I placed log4j.properties file in WEB-INF/classes folder. But instead of using my application specific log4j.properties, it is using default log4j.properties and printing the logs in server.log.

When do I need to place the log4j.properties to be picked up? My war file is a JSR portlet, so I cannot use static method to read the properties file.

Thank you.

user1732528
  • 51
  • 1
  • 5

1 Answers1

0

3 step guide to setup your own log4j for jboss 4.2

1: place your log4j.properties on classpath of your WAR/EAR

2: place your log4j.jar in your classpath

3: isolate classloader using jboss-web.xml to use your copy of jar for your application

for detailed steps refer to this article : how to use custom log4j

Mukul Goel
  • 8,387
  • 6
  • 37
  • 77