[jboss-user] [Beginner's Corner] - Re: Application logging in server.log though application logs are seperated.

Wolf-Dieter Fink do-not-reply at jboss.com
Wed Mar 7 07:08:21 EST 2012


Wolf-Dieter Fink [https://community.jboss.org/people/wdfink] created the discussion

"Re: Application logging in server.log though application logs are seperated."

To view the discussion, visit: https://community.jboss.org/message/722090#722090

--------------------------------------------------------------
This config log all into all files, thats not what you try to do.

Add:
<category name="x.y.z">  <==== your package or log-category
  <priority value="TRACE" />
  <appender-ref ref="ABCWAR"/>
</category>

This should be before the <root> and remove the appender-ref from root, thats it.

If you want to have the JBoss classes in your logfile then you have to add a filter to the FILE appender that have AcceptOnMatch=false.
But this will be a performance and lock contention issue.
The reason is that the category is checked before the log statement is executed.
The appender filter is inside the file-write-sync-block and you will have locking contention in case of high traffic!

So if you only want to have a business logging of your app use the category.
In case of analyzing problems I would recommend to add the FILE appender to your category and use the server.log for this.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/722090#722090]

Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120307/8262fd9f/attachment.html 


More information about the jboss-user mailing list