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

How to separate Jboss4.0.2 logs from application log using log4j

 
geeta Paygude
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have an application developed in EJB2.1 using jboss 4.0.2

I want to separate out jboss log from my application logs

I chnaged jboss log4j.xml and added following entries

<appender name="RCSLog" class="org.apache.log4j.FileAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="Append" value="false"/>
<param name="File" value="c://rcs.log"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{yyyy MM dd HH:MM:SS }, [%-5p], RCS, [%t], %C{1}.%M - %m%n"/>
</layout>
</appender>

<category name="src.com.ail.dhg.rcs.business.beans" additivity="false">
<appender-ref ref="RCSLog"/>
</category>



<!-- ======================= -->
<!-- Setup the Root category -->
<!-- ======================= -->

<root>
<appender-ref ref="CONSOLE"/>
<!--appender-ref ref="FILE"/ -->
<appender-ref ref="RCSLog"/>
</root>

but it still mixes both the logs together

In my <category name="src.com.ail" additivity="false"> tag ,
name is package name

can any one tell me what other changes do i need to make in order to separate application server logs from my own logs


Please Reply

Regards
Geetanjali
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Remove your appender from the list of root appenders. Something like:

 
geeta Paygude
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You so much

by removing that entry it worked absolutely fine

Thank you once again

Regards,
Geetanjali
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic