JBoss Log Manager 1.2.0.GA

org.jboss.logmanager.filters
Class SubstituteFilter

java.lang.Object
  extended by org.jboss.logmanager.filters.SubstituteFilter
All Implemented Interfaces:
Filter

public final class SubstituteFilter
extends Object
implements Filter

A filter which applies a text substitution on the message if the nested filter matches.


Constructor Summary
SubstituteFilter(Pattern pattern, String replacement, boolean replaceAll)
          Construct a new instance.
SubstituteFilter(String patternString, String replacement, boolean replaceAll)
          Construct a new instance.
 
Method Summary
 boolean isLoggable(LogRecord record)
          Apply the filter to the given log record.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubstituteFilter

public SubstituteFilter(Pattern pattern,
                        String replacement,
                        boolean replaceAll)
Construct a new instance.

Parameters:
pattern - the pattern to match
replacement - the string replacement
replaceAll - true if all occurrances should be replaced; false if only the first occurrance

SubstituteFilter

public SubstituteFilter(String patternString,
                        String replacement,
                        boolean replaceAll)
Construct a new instance.

Parameters:
patternString - the pattern to match
replacement - the string replacement
replaceAll - true if all occurrances should be replaced; false if only the first occurrance
Method Detail

isLoggable

public boolean isLoggable(LogRecord record)
Apply the filter to the given log record.

Specified by:
isLoggable in interface Filter
Parameters:
record - the log record to inspect and modify
Returns:
true always

JBoss Log Manager 1.2.0.GA

Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.