source: tmp/version-2_5-test/data/module/log4php/php5/log4php/appenders/LoggerAppenderNull.php @ 18609

Revision 18609, 1.7 KB checked in by kajiwara, 14 years ago (diff)

正式版にナイトリービルド版をマージしてみるテスト

Line 
1<?php
2/**
3 * Licensed to the Apache Software Foundation (ASF) under one or more
4 * contributor license agreements.  See the NOTICE file distributed with
5 * this work for additional information regarding copyright ownership.
6 * The ASF licenses this file to You under the Apache License, Version 2.0
7 * (the "License"); you may not use this file except in compliance with
8 * the License.  You may obtain a copy of the License at
9 *
10 *     http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 *
19 * @package log4php
20 * @subpackage appenders
21 */
22
23/** @ignore */
24if (!defined('LOG4PHP_DIR')) define('LOG4PHP_DIR', dirname(__FILE__) . '/..');
25 
26require_once(LOG4PHP_DIR . '/LoggerAppenderSkeleton.php');
27require_once(LOG4PHP_DIR . '/LoggerLog.php');
28
29/**
30 * A NullAppender merely exists, it never outputs a message to any device. 
31 *
32 * @author  Marco Vassura
33 * @version $Revision: 635069 $
34 * @package log4php
35 * @subpackage appenders
36 */
37class LoggerAppenderNull extends LoggerAppenderSkeleton {
38
39    /**
40     * @access private
41     */
42    protected $requiresLayout = false;
43   
44    public function activateOptions()
45    {
46        $this->closed = false;
47    }
48   
49    public function close()
50    {
51        $this->closed = true;
52    }
53   
54    /**
55     * Do nothing.
56     * How I Love it !! :)
57     *
58     * @param LoggerLoggingEvent $event
59     */
60    protected function append($event)
61    {
62        LoggerLog::debug("LoggerAppenderNull::append()");
63    }
64}
65
Note: See TracBrowser for help on using the repository browser.