Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

setting up log4J for application

 
Skanda Raman
Ranch Hand
Posts: 205
Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a requirement to configure log4j for a application available in myapp.war. so i created my own log4j properties file and used the same by calling in different class files.

Now i deployed myapp.war file in default/deploy folder of jboss 5.0.1 server and accessed the application, immediately server console appender started looping and logging was failed.

As jboss already has default log4j appender, can you please let me know how can i achieve creating my own log4j file to activate logging action of different information/errors occurring in my application.

Please help.


 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would have pointed you to a JBoss forum discussion about this exact issue, but the forums are down for maintenance now. So here's another resource where you can find this information.
 
Skanda Raman
Ranch Hand
Posts: 205
Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks jai kiran for giving us good article.

I followed as said in article but have got below error. can you please let me know if i am wrong any where.




and my log4j properties file looks like this



i am logging info from servlet like

logger.info("Hello");
logger.info("world");
 
Prakash Kumar M
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eshwar, even i tried to set up log4j to my war file but have the same problem..

Any help. please
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you configure the jboss-web.xml for classloading isolation? Can you please post its contents? Also please post the output of:

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic