fr.ifremer.isisfish.logging
Class ThreadFilter

java.lang.Object
  extended by org.apache.log4j.spi.Filter
      extended by fr.ifremer.isisfish.logging.ThreadFilter
All Implemented Interfaces:
org.apache.log4j.spi.OptionHandler

public class ThreadFilter
extends org.apache.log4j.spi.Filter

this class is Log4J filter to accept only incoming log events from a unique thread. it retains all logEvent coming from other threads (compare with given thread name).

Author:
chemit

Field Summary
protected  java.lang.String threadName
          the name of the only thread to accept
 
Fields inherited from class org.apache.log4j.spi.Filter
ACCEPT, DENY, NEUTRAL, next
 
Constructor Summary
ThreadFilter(java.lang.String threadName)
           
 
Method Summary
 int decide(org.apache.log4j.spi.LoggingEvent event)
           
 void setThreadName(java.lang.String threadName)
           
 
Methods inherited from class org.apache.log4j.spi.Filter
activateOptions, getNext, setNext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

threadName

protected java.lang.String threadName
the name of the only thread to accept

Constructor Detail

ThreadFilter

public ThreadFilter(java.lang.String threadName)
Method Detail

decide

public int decide(org.apache.log4j.spi.LoggingEvent event)
Specified by:
decide in class org.apache.log4j.spi.Filter

setThreadName

public void setThreadName(java.lang.String threadName)


Copyright © 1999-2010 CodeLutin. All Rights Reserved.