aspose file tools*
The moose likes JBoss/WildFly and the fly likes Can't figure out why my log4j.log file isn't being populated Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Can Watch "Can New topic
Author

Can't figure out why my log4j.log file isn't being populated

Dave Alvarado
Ranch Hand

Joined: Jul 02, 2008
Posts: 436
Hi,

I'm using JBoss 4.2.3.GA (can't change this), and log4j 1.2.15. I have deployed an EAR file to JBoss containing



In "myclient.jar", I have a class with this



Sadly my log message doesn't appear and I can't figure out why. Here's my log4j.properties file ...



I have verified that the parent directory exists. Any ideas why nothing is showing up in my log file? Any other ideas on how to troubleshoot this? The JBoss server log tells me the EAR got deployed successfully.

Thanks, - Dave
Guillaume Jourdan
Ranch Hand

Joined: Jul 24, 2012
Posts: 47

Your static method (or static block) is called only the first time you refer to your class (by the class loader) else your static method (or block) is never called.

Do you have a reference to this class when you deploy your application?
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5843
    
    7

The standard way of configuring logging in 4.2.3 is to modify the server/xxx/config/jboss-log4j.xml file. Logging config files within your EAR or WAR will not be picked up.

Also, have you seen this: https://community.jboss.org/message/198691#198690


JBoss In Action
 
Don't get me started about those stupid light bulbs.
 
subject: Can't figure out why my log4j.log file isn't being populated