File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JBoss/WildFly and the fly likes How to separate Jboss4.0.2 logs from application log using log4j Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "How to separate Jboss4.0.2 logs from application log using log4j" Watch "How to separate Jboss4.0.2 logs from application log using log4j" New topic
Author

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

geeta Paygude
Greenhorn

Joined: Dec 12, 2006
Posts: 9
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

Joined: Jul 20, 2005
Posts: 9934
    
159



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



[My Blog] [JavaRanch Journal]
geeta Paygude
Greenhorn

Joined: Dec 12, 2006
Posts: 9
Thank You so much

by removing that entry it worked absolutely fine

Thank you once again

Regards,
Geetanjali
 
jQuery in Action, 2nd edition
 
subject: How to separate Jboss4.0.2 logs from application log using log4j
 
Similar Threads
Want to seperate Logs in Info and Error
Avoid additional server.log debug lines
Legacy log4J
JBoss and Log4j
log4j printing to console but not to file from eclipse