[
https://issues.jboss.org/browse/JBAS-4413?page=com.atlassian.jira.plugin....
]
Ram V commented on JBAS-4413:
-----------------------------
Hi,
We are planning to use TCLFilter in Jboss 4.x to prevent logs being written into the
server.log file of Jboss ( Currently our application logs are written into Server.log and
this increases the size of the server.log). So, I would like to request senior members in
this forum to comment, if there would be any performance hit /issue if we configure
TCLFilter? Is it advisable to use TCLFilter to Filter out/Stop Unwanted logging into
server.log in production based environments? Your replies would be highly appreciated.
Thanks in Advance
Incorrect behaviour in TCLFilter
--------------------------------
Key: JBAS-4413
URL:
https://issues.jboss.org/browse/JBAS-4413
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Logging
Affects Versions: JBossAS-4.0.5.GA
Reporter: Poyan
Assignee: Scott Stark
Fix For: No Release
Original Estimate: 30 minutes
Remaining Estimate: 30 minutes
Just one TCLFilter can be added to an appender, decide method return either ACCEPT or
DENY.
Should return NEUTRAL is some case.
public int decide(LoggingEvent event)
{
int ok = Filter.DENY;
if( acceptOnMatch == true )
{
ok = Filter.DENY;
if( isMatchingTCL() ){
ok = Filter.ACCEPT;
}
}
else
{
ok = Filter.ACCEPT; // CHANGING THIS ROW TO ok = Filter.NEUTRAL; should do that you check
the other filters to.
if( isMatchingTCL() )
ok = Filter.DENY;
}
return ok;
}
Log4j.xml:
<appender name="CONSOLE"
class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%t] %c -
%m%n"/>
</layout>
<filter class="org.jboss.logging.filter.TCLFilter">
<param name="AcceptOnMatch" value="false"/>
<param name="DeployURL"
value="jboss-common-client.jarpoyan"/>
</filter>
<filter class="org.jboss.logging.filter.TCLFilter">
<param name="AcceptOnMatch" value="false"/>
<param name="DeployURL" value="dnsns.jarpoyan"/>
</filter>
</appender>
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira