You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4php-dev@logging.apache.org by ma...@apache.org on 2006/01/14 17:53:11 UTC
svn commit: r369047 -
/logging/log4php/trunk/src/php5/log4php/appenders/LoggerAppenderNull.php
Author: marco
Date: Sat Jan 14 08:53:05 2006
New Revision: 369047
URL: http://svn.apache.org/viewcvs?rev=369047&view=rev
Log:
Imported from Log4php php4.
Added:
logging/log4php/trunk/src/php5/log4php/appenders/LoggerAppenderNull.php
Added: logging/log4php/trunk/src/php5/log4php/appenders/LoggerAppenderNull.php
URL: http://svn.apache.org/viewcvs/logging/log4php/trunk/src/php5/log4php/appenders/LoggerAppenderNull.php?rev=369047&view=auto
==============================================================================
--- logging/log4php/trunk/src/php5/log4php/appenders/LoggerAppenderNull.php (added)
+++ logging/log4php/trunk/src/php5/log4php/appenders/LoggerAppenderNull.php Sat Jan 14 08:53:05 2006
@@ -0,0 +1,56 @@
+<?php
+/**
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * This software is published under the terms of the Apache Software
+ * License version 2.0, a copy of which has been included with this
+ * distribution in the LICENSE file.
+ *
+ * @package log4php
+ * @subpackage appenders
+ */
+
+/** @ignore */
+if (!defined('LOG4PHP_DIR')) define('LOG4PHP_DIR', dirname(__FILE__) . '/..');
+
+require_once(LOG4PHP_DIR . '/LoggerAppenderSkeleton.php');
+require_once(LOG4PHP_DIR . '/LoggerLog.php');
+
+/**
+ * A NullAppender merely exists, it never outputs a message to any device.
+ *
+ * @author Marco Vassura
+ * @version $Revision: 312333 $
+ * @package log4php
+ * @subpackage appenders
+ */
+class LoggerAppenderNull extends LoggerAppenderSkeleton {
+
+ /**
+ * @access private
+ */
+ protected $requiresLayout = false;
+
+ public function activateOptions()
+ {
+ $this->closed = false;
+ }
+
+ public function close()
+ {
+ $this->closed = true;
+ }
+
+ /**
+ * Do nothing.
+ * How I Love it !! :)
+ *
+ * @param LoggerLoggingEvent $event
+ */
+ protected function append($event)
+ {
+ LoggerLog::debug("LoggerAppenderNull::append()");
+ }
+}
+
+?>
\ No newline at end of file