Exemplo n.º 1
0
 /**
  * Temporarily suppresses all application logging. Used to hide the numerous
  * SQL statements involved in setting up and tearing down fixtures.
  *
  * IMPORTANT: This call suppresses logging for the entire application! Always
  * remember to balance this with a call to {@link _resumeLogging()}
  *
  * @see _resumeLogging()
  */
 private static function _suppressLogging()
 {
     /* A counter is used since fixture loading can be recursive. Logging
      * is suppressed and resumed only at the top level.
      */
     if (++self::$_suppressLogDepth > 1) {
         return;
     }
     if (is_null(self::$_suppressLogFilter)) {
         self::$_suppressLogFilter = new Horde_Log_Filter_Suppress();
         $logger = self::logger();
         if (!is_null($logger)) {
             $logger->addFilter(self::$_suppressLogFilter);
         }
     }
     self::$_suppressLogFilter->suppress(true);
 }