• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Dave Alvarado
Ranch Hand
Posts: 436
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 47
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic