-
1. Re: How do I configure this type of logging????
jaikiran Jul 11, 2006 10:24 AM (in response to askesis)Try this out:
<appender name="MY_FILE" class="org.jboss.logging.appender.RollingFileAppender"> <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/> <param name="File" value="${jboss.server.home.dir}/log/someFile.log"/> <param name="Append" value="false"/> <param name="MaxFileSize" value="50MB"/> <param name="MaxBackupIndex" value="20"/> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%d{ISO8601} [%X{TAPUSERNAME}] %-5p [%c] %m%n"/> </layout> </appender> <category name="myPackage.myClass"> <priority value="DEBUG"/> <appender-ref ref="MY_FILE"/> </category>
-
2. Re: How do I configure this type of logging????
askesis Jul 11, 2006 2:01 PM (in response to askesis)Hi Jaikiran,
This still shows *all* output of JBoss in the new file, not just from the package "myPackage" and all the classes in the package.
Adding
reduces the clutter, but it still shows stuff from JBoss and I only want thing from my MyApplication.ear that are from my myPackage... -
3. Re: How do I configure this type of logging????
askesis Jul 11, 2006 2:02 PM (in response to askesis)This is what I added:
<filter class="org.jboss.logging.filter.TCLFilter"> <param name="AcceptOnMatch" value="true"/> <param name="DeployURL" value="MuntpostDevServer.ear"/> </filter>
Sorry for the inconvenience -
4. Re: How do I configure this type of logging????
askesis Jul 11, 2006 10:24 PM (in response to askesis)I solved it by removing the appender-ref from root
-
5. Re: How do I configure this type of logging????
firasarabo Jun 23, 2011 2:18 AM (in response to jaikiran)I have a similar requirement. I have a.war and b.war deployed into jboss I am able to let the log coming out of each war file to be logged into a separate log file using filter, a.log and b.log respectively.
both a.war and b.war are using some library e.g. "com.some.thing" and I wanted to have a separate log file for everything that is coming out of this package. and I was able to do that by doing an appender and then a category like:
<category name="com.some.think">
<priority value="INFO"/>
<appender-ref ref="MYFILE"/>
</category>
so now I have 3 log files
a.log
b.log
myfile.log
however the log printed in myfile.log also showing in either a.log or b.log, the question is how to prevent log statement coming out of com.some.thing from being printed in either a.log or b.log?
Thanks,
Firas