JBoss Community

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

created by Wolf-Dieter Fink in Beginner's Corner - View the full discussion

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

Start a new discussion in Beginner's Corner at Community