You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Neeraja Renduchintala <NR...@isc-citytime.com> on 2003/10/07 14:18:19 UTC
JMS
Hi,
I am using JMSAppender to write log events to a JMS Topic. This is working
great. Now I want to use Chainsaw to read these messages off the topic and
display them. Is this some thing I can do with Chainsaw? I kind of want
Chainsaw to act as my MDB and receive messages and display them.
Looking at the documentation it looks like chainsaw can only read from flat
files or from a socket. Would this mean that I need to use a MDB to read the
message and then write it to a socket on which I will have chainsaw
listening? Somehow seems like this had to be part of log4j and that I am
missing some thing.
Any help is greatly appreciated.
--neeraja
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org
Re: problems using Filters..
Posted by Srinivas Chennamaraja <sc...@hotmail.com>.
Hi,
I am trying to use Filter to filter out messages. I have defined 3 appenders
called APPLICATION, AUDIT, and ESNM. I have created a custom Level class
EISLevel in which I added two new Levels called "AUDIT" and "ESNM". the
order is ESNM>AUDIT>FATAL.
I want all the messages between DEBUG and FATAL should go to APPLICATION,
and only AUDIT messages should go to AUDIT and only ESNM messages should go
to ESNM appender. but my audit logfiles contains DEBUG through AUDIT where
as my esnm log files contains all the messages. Here is my log4j.xml file..
Am I missing something?.. I would appreciate any feed back on this....
thanks,
Srinivas Chennamaraja
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>
<appender name="APPLCATION" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="${logging.dir}/application.log"/>
<param name="MaxFileSize" value="100KB"/>
<param name="MaxBackupIndex" value="2"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%t] %c - %m%n"/>
</layout>
<filter class="org.apache.log4j.varia.LevelRangeFilter">
<param name="LevelMin" value="debug" />
<param name="LevelMax" value="fatal" />
<param name="AcceptOnMatch" value="true" />
</filter>
</appender>
<appender name="AUDIT" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="${logging.dir}/audit.log"/>
<param name="MaxFileSize" value="100KB"/>
<param name="MaxBackupIndex" value="2"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%t] %c - %m%n"/>
</layout>
<filter class="org.apache.log4j.varia.LevelMatchFilter">
<param name="LevelToMatch"
value="audit#gov.cbp.ace.eis.logger.EISLevel" />
<param name="AcceptOnMatch" value="true" />
</filter>
<filter class="org.apache.log4j.varia.DenyAllFilter"/>
</appender>
<appender name="ESNM" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="${logging.dir}/esnm.log"/>
<param name="MaxFileSize" value="100KB"/>
<param name="MaxBackupIndex" value="2"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%t] %c - %m%n"/>
</layout>
<filter class="org.apache.log4j.varia.LevelMatchFilter">
<param name="LevelToMatch"
value="esnm#gov.cbp.ace.eis.logger.EISLevel" />
<param name="AcceptOnMatch" value="true" />
</filter>
<filter class="org.apache.log4j.varia.DenyAllFilter"/>
</appender>
<root>
<level value="debug" />
<appender-ref ref="APPLCATION" />
<appender-ref ref="AUDIT" />
<appender-ref ref="ESNM" />
</root>
</log4j:configuration>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org