Class LoggerFilterDenyAll

Description

This filter drops all logging events.

You can add this filter to the end of a filter chain to switch from the default "accept all unless instructed otherwise" filtering behaviour to a "deny all unless instructed otherwise" behaviour.

<p> An example for this filter:

  1. require_once dirname(__FILE__).'/../../main/php/Logger.php';
  2.  
  3. Logger::configure(dirname(__FILE__).'/../resources/filter_denyall.xml');
  4. $logger Logger::getRootLogger();
  5. $logger->info("Some text that will be discarded");

<p> The corresponding XML file:

  1. <log4php:configuration xmlns:log4php="http://logging.apache.org/log4php/" threshold="all">
  2.     <appender name="default" class="LoggerAppenderEcho">
  3.         <layout class="LoggerLayoutTTCC"/>
  4.         <filter class="LoggerFilterDenyAll"/>
  5.     </appender>
  6.     <root>
  7.         <level value="DEBUG" />
  8.         <appender_ref ref="default" />
  9.     </root>
  10. </log4php:configuration>

  • version: $Revision: 883108 $
  • since: 0.3

Located in /filters/LoggerFilterDenyAll.php (line 44)

LoggerConfigurable
   |
   --LoggerFilter
      |
      --LoggerFilterDenyAll
Method Summary
LoggerFilter::DENY decide (LoggerLoggingEvent $event)
Variables

Inherited Variables

Inherited from LoggerFilter

LoggerFilter::$next
Methods
Class Constants

Documentation generated on Sat, 18 Feb 2012 22:32:24 +0000 by phpDocumentor 1.4.3