Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Application logging in JBoss 6

 
Vikas Ajay
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Can anyone please redirect me to fix jboss 6 logging issue ? I am able to create a application.log file but i don't see any logging statements into it, all are going into server.log. Please correct me.

Thanks in advance,

Regards,
Ajay.
 
Vikas Ajay
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone please check this? I was badly struck on this.

Thanks in advance,
Vikas.
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's really hard to guess what the problem is since your post doesn't have any information about the logging configurations and your application packaging. Please post those details.
 
Vikas Ajay
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks JaiKiran for your reply. I have made progress to my issue. I have configured my application logger in jboss-logging.xml. I use jboss 6. Now the problem is, i am getting my application log statements redirected to both server.log and myApp.log. I want my application log statements to be redirected only to myApp.log and all jboss api log statements to server.log. Please suggest/correct me on this.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to properly set the logger categories and the root logger. Essentially, you want to set the root logger to not log anything (remove the handlers). And then set up loggers for the various categories and define handlers in them. This discussion should help:
https://community.jboss.org/message/760382#760382
That discussion is about 5.1.0 which uses log4j, and the JBoss logging framework uses slightly different xml tags, but the principles still apply.

 
Vikas Ajay
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Peter! It worked by removing the handlers in root logger node. I have a question here, i don't see server.log itself getting created. I am missing org.jboss/org.apache log statements which appears when you try to traverse the admin console or any other activity in server. I believe, ideally all these statements should move to server.log.
Also i have put,



But still i don't see server.log getting created. Please suggest/correct on this.

Thanks In Advance,

--
Vikas.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic