FileDocCategorySizeDatePackage
ControlFilter.javaAPI DocApache log4j 1.2.151502Sat Aug 25 00:09:34 BST 2007org.apache.log4j.util

ControlFilter

public class ControlFilter extends Object implements Filter

Fields Summary
org.apache.oro.text.perl.Perl5Util
util
String[]
allowedPatterns
Constructors Summary
public ControlFilter(String[] allowedPatterns)


     
    this.allowedPatterns = allowedPatterns;
  
Methods Summary
public java.lang.Stringfilter(java.lang.String in)

    int len = allowedPatterns.length;
    for(int i = 0; i < len; i++) {
      //System.out.println("["+allowedPatterns[i]+"]");
      if(util.match("/"+allowedPatterns[i]+"/", in)) {
	//System.out.println("["+in+"] matched ["+allowedPatterns[i]);
	return in;
      }	
    }

    throw new UnexpectedFormatException("["+in+"]");