• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

JBoss 7.1.1.Final - Log4j - EAR File application - Logging not working

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Friends,

I found few details about the log4j configuration.

We do have few application already running on JBoss 3.x and I am migrating them to JBoss 7.1.1.Final.

Few of the WAR file, JAR files and EAR files. I found some documents to configure the Log4j within JBoss.

It worked great with WAR files. Still, I couldn't make it work on EAR files.




I can't use JBoss logging because it is a big application and all classes using Log4j. Now, what is the best place for log4j.properties?

I can have all EAR classes Logging to 1 configuration....
 
Santhosh Kalisamy
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have fixed it. 2 solutions.

1. add log4j.xml in to a blank jar and place it on EAR/lib directory.
2. Create a custom module which just has log4j.xml and module.xml. Include that module on JBoss deployment structure xml file. It will be picked up.

Good luck buddies. If anyone need more information, I will post the solution code here later.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Santhosh,

I created a custome module which has log4j.xml and module.xml. The module is included on JBoss deployment structure xml file. But I did not see the log created in the defined directory.

Please give me some pointers when you get a chance.

Thank you!
 
Santhosh Kalisamy
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

BingBing Wang wrote:Santhosh,

I created a custome module which has log4j.xml and module.xml. The module is included on JBoss deployment structure xml file. But I did not see the log created in the defined directory.

Please give me some pointers when you get a chance.

Thank you!



Hi Wang,

could you please paste here (or new thread and give me the link) your log4j.xml, module.xml with module directory structure and jboss-deployment-structure.xml.

Will see, how can I help...

Good Luck!
 
BingBing Wang
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Santhosh,

Thank you for your reply. I actually found the code you posted on this link https://community.jboss.org/thread/219871

It is really helpful. I configured my external logging module as the one you posted. It works fine.

Thank you so much!!!
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"BingBing Wang" please your your private messages regarding an important administrative matter.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic