GeeCON Prague 2014*
The moose likes JBoss/WildFly and the fly likes Application logging in JBoss 6 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Application logging in JBoss 6" Watch "Application logging in JBoss 6" New topic
Author

Application logging in JBoss 6

Vikas Ajay
Greenhorn

Joined: Sep 21, 2012
Posts: 4
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

Joined: Sep 21, 2012
Posts: 4
Can anyone please check this? I was badly struck on this.

Thanks in advance,
Vikas.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10146
    
165

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.


[My Blog] [JavaRanch Journal]
Vikas Ajay
Greenhorn

Joined: Sep 21, 2012
Posts: 4
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

Joined: May 14, 2008
Posts: 5836
    
    7

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.


JBoss In Action
Vikas Ajay
Greenhorn

Joined: Sep 21, 2012
Posts: 4
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.
 
GeeCON Prague 2014
 
subject: Application logging in JBoss 6