ch.qos.logback.classic.turbo
Class DebugUsersTurboFilter

java.lang.Object
  extended by ch.qos.logback.core.spi.ContextAwareBase
      extended by ch.qos.logback.classic.turbo.TurboFilter
          extended by ch.qos.logback.classic.turbo.DebugUsersTurboFilter
All Implemented Interfaces:
ContextAware, LifeCycle

public class DebugUsersTurboFilter
extends TurboFilter

This class allows output of debug level events to a certain list of users. If the level passed as a parameter is of level DEBUG, then the "user" value taken from the MDC is checked against the configured user list. When the user belongs to the list, the request is accepted. Otherwise a NEUTRAL response is sent, thus not influencing the filter chain.

Author:
Ceki Gülcü, Sébastien Pennec

Field Summary
 
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
 
Constructor Summary
DebugUsersTurboFilter()
           
 
Method Summary
 void addUser(String user)
           
 FilterReply decide(org.slf4j.Marker marker, Logger logger, Level level, String format, Object[] params, Throwable t)
           
 List<String> getUsers()
           
 
Methods inherited from class ch.qos.logback.classic.turbo.TurboFilter
getName, isStarted, setName, start, stop
 
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getStatusManager, setContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DebugUsersTurboFilter

public DebugUsersTurboFilter()
Method Detail

decide

public FilterReply decide(org.slf4j.Marker marker,
                          Logger logger,
                          Level level,
                          String format,
                          Object[] params,
                          Throwable t)
Specified by:
decide in class TurboFilter

addUser

public void addUser(String user)

getUsers

public List<String> getUsers()


Copyright © 2005-2009 QOS.ch. All Rights Reserved.