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 2004/03/08 22:21:51 UTC

cvs commit: logging-log4php/src/tests/configurators test.php

marco       2004/03/08 13:21:51

  Added:       src/tests/configurators/configs LoggerDOMConfigurator_01.xml
                        LoggerDOMConfigurator_02.xml
                        LoggerDOMConfigurator_03.xml
                        LoggerDOMConfigurator_04.xml
                        LoggerPropertyConfigurator_01.properties
                        LoggerPropertyConfigurator_02.properties
                        LoggerPropertyConfigurator_03.properties
                        LoggerPropertyConfigurator_04.properties
               src/tests/configurators test.php
  Log:
  Initial Import
  
  Revision  Changes    Path
  1.1                  logging-log4php/src/tests/configurators/configs/LoggerDOMConfigurator_01.xml
  
  Index: LoggerDOMConfigurator_01.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <!--
      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.
   
      @author Marco V. <ma...@apache.org>
      @version $Revision: 1.1 $
      @since 0.5
  -->
  <log4php:configuration xmlns:log4php="http://logging.apache.org/log4php/" threshold="all" debug="false">
      <appender name="default" class="LoggerAppenderEcho">
          <layout class="LoggerPatternLayout">
              <param name="conversionPattern" value="${MY_CONSTANT} %-5p [%t] [%X{env.OS}]: %m in %F line %L%n" />
          </layout>
      </appender>
  
      <root>
          <level value="debug" />
          <appender_ref ref="default" />        
      </root>
  </log4php:configuration>
  
  
  
  1.1                  logging-log4php/src/tests/configurators/configs/LoggerDOMConfigurator_02.xml
  
  Index: LoggerDOMConfigurator_02.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <!--
      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.
   
      @author Marco V. <ma...@apache.org>
      @version $Revision: 1.1 $
      @since 0.5
  -->
  <log4php:configuration xmlns:log4php="http://logging.apache.org/log4php/" threshold="all" debug="true">
      <appender name="default" class="LoggerAppenderEcho">
          <layout class="LoggerLayoutSimple" />
      </appender>
  
      <root>
          <level value="debug" />
          <appender_ref ref="default" />        
      </root>
  
      <logger name="Test" class="Logger" />
  
  </log4php:configuration>
  
  
  
  1.1                  logging-log4php/src/tests/configurators/configs/LoggerDOMConfigurator_03.xml
  
  Index: LoggerDOMConfigurator_03.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <!--
      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.
   
      @author Marco V. <ma...@apache.org>
      @version $Revision: 1.1 $
      @since 0.5
  -->
  <log4php:configuration xmlns:log4php="http://logging.apache.org/log4php/" threshold="all" debug="false">
      <appender name="default" class="LoggerAppenderEcho">
          <layout class="LoggerPatternLayout">
              <param name="conversionPattern" value="${PROCESSOR_IDENTIFIER} %-5p [%t] [%X{env.OS}]: %m in %F line %L%n" />
          </layout>
      </appender>
  
      <root>
          <level value="debug" />
          <appender_ref ref="" />        
      </root>
  </log4php:configuration>
  
  
  
  1.1                  logging-log4php/src/tests/configurators/configs/LoggerDOMConfigurator_04.xml
  
  Index: LoggerDOMConfigurator_04.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <!--
      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.
   
      @author Marco V. <ma...@apache.org>
      @version $Revision: 1.1 $
      @since 0.5
  -->
  <log4php:configuration xmlns:log4php="http://logging.apache.org/log4php/" threshold="all" debug="false">
      <appender name="default" class="LoggerAppenderEcho">
          <layout class="LoggerPatternLayout">
              <param name="conversionPattern" value="${PROCESSOR_IDENTIFIER} %-5p [%t] [%X{env.OS}]: %m in %F line %L%n" />
          </layout>
      </appender>
  
      <root>
          <level value="debug" />
          <appender_ref ref="default" />        
  <!-- </root> -->
  </log4php:configuration>
  
  
  
  1.1                  logging-log4php/src/tests/configurators/configs/LoggerPropertyConfigurator_01.properties
  
  Index: LoggerPropertyConfigurator_01.properties
  ===================================================================
  ;   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.
  ;   @author Marco V. <ma...@apache.org>
  ;   @version $Revision: 1.1 $
  ;   @since 0.5
  ;
  
  log4php.debug = false
  log4php.rootLogger=DEBUG, A1
  log4php.logger.Test=WARN, A1
  log4php.appender.A1=LoggerAppenderEcho
  log4php.appender.A1.layout=LoggerLayoutHtml
  
  
  
  
  1.1                  logging-log4php/src/tests/configurators/configs/LoggerPropertyConfigurator_02.properties
  
  Index: LoggerPropertyConfigurator_02.properties
  ===================================================================
  ;   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.
  ;   @author Marco V. <ma...@apache.org>
  ;   @version $Revision: 1.1 $
  ;   @since 0.5
  ;
  log4php.debug = false
  log4php.rootLogger=DEBUG, A1
  log4php.appender.A1=LoggerAppenderEcho
  log4php.appender.A1.layout=LoggerPatternLayout
  log4php.appender.A1.layout.ConversionPattern="$_ENV[USERNAME] = ${USERNAME} and $_ENV[PROCESSOR_ARCHITECTURE] = ${PROCESSOR_ARCHITECTURE} %m%n"
  
  
  
  1.1                  logging-log4php/src/tests/configurators/configs/LoggerPropertyConfigurator_03.properties
  
  Index: LoggerPropertyConfigurator_03.properties
  ===================================================================
  ;   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.
  ;   @author Marco V. <ma...@apache.org>
  ;   @version $Revision: 1.1 $
  ;   @since 0.5
  ;
  
  log4php.debug = false
  log4php.rootLogger=DEBUG, A0, A1, A2
  log4php.logger.test=, A0, A1
  log4php.appender.A1=LoggerAppenderFoo
  log4php.appender.A2=LoggerAppenderEcho
  log4php.appender.A2.layout=LoggerLayoutBar
  
  
  
  1.1                  logging-log4php/src/tests/configurators/configs/LoggerPropertyConfigurator_04.properties
  
  Index: LoggerPropertyConfigurator_04.properties
  ===================================================================
  ;   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.
  ;   @author Marco V. <ma...@apache.org>
  ;   @version $Revision: 1.1 $
  ;   @since 0.5
  ;
  log4php.debug = true
  log4php.loggerFactory=Foo
  ;log4php.factory.option1=option1
  log4php.rootLogger=DEBUG, A1
  log4php.logger.test=WARN
  log4php.appender.A1=LoggerAppenderEcho
  log4php.appender.A1.layout=LoggerLayoutSimple
  
  
  
  1.1                  logging-log4php/src/tests/configurators/test.php
  
  Index: test.php
  ===================================================================
  <?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 tests
   * @author Marco V. <ma...@apache.org>
   * @subpackage configurators
   * @version $Revision: 1.1 $
   * @since 0.5
   */
  
  /**
   * @var array Test array
   */
  $tests = array(
      'LoggerPropertyConfigurator_01'     => array(
          '__COMMENT__'           => 'Basic LoggerPropertyConfigurator',
          'LOG4PHP_DIR'           => null,
          'LOG4PHP_CONFIGURATION' => './configs/LoggerPropertyConfigurator_01.properties'
       ),
      'LoggerPropertyConfigurator_02'     => array( 
          '__COMMENT__'           => 'LoggerPropertyConfigurator with variable substitution',
          'LOG4PHP_DIR'           => null,
          'LOG4PHP_CONFIGURATION' => './configs/LoggerPropertyConfigurator_02.properties'
      ),     
      'LoggerPropertyConfigurator_03'     => array( 
          '__COMMENT__'           => 'LoggerPropertyConfigurator with bad configuration file',
          'LOG4PHP_DIR'           => null,
          'LOG4PHP_CONFIGURATION' => './configs/LoggerPropertyConfigurator_03.properties'
      ),     
      'LoggerPropertyConfigurator_04'     => array( 
          '__COMMENT__'           => 'LoggerPropertyConfigurator with factory',
          'LOG4PHP_DIR'           => null,
          'LOG4PHP_CONFIGURATION' => './configs/LoggerPropertyConfigurator_04.properties'
      ),
      'LoggerDOMConfigurator_01'     => array( 
          '__COMMENT__'           => 'LoggerDOMConfigurator with variable substitution',
          'LOG4PHP_DIR'           => null,
          'LOG4PHP_CONFIGURATION' => './configs/LoggerDOMConfigurator_01.xml'
      ),     
      'LoggerDOMConfigurator_02'     => array( 
          '__COMMENT__'           => 'LoggerDOMConfigurator with class factory',
          'LOG4PHP_DIR'           => null,
          'LOG4PHP_CONFIGURATION' => './configs/LoggerDOMConfigurator_02.xml'
      ),     
      'LoggerDOMConfigurator_03'     => array( 
          '__COMMENT__'           => 'LoggerDOMConfigurator with bad configuration file',
          'LOG4PHP_DIR'           => null,
          'LOG4PHP_CONFIGURATION' => './configs/LoggerDOMConfigurator_03.xml'
      ),     
      'LoggerDOMConfigurator_04'     => array( 
          '__COMMENT__'           => 'LoggerDOMConfigurator with bad configuration file (xml not well formed)',
          'LOG4PHP_DIR'           => null,
          'LOG4PHP_CONFIGURATION' => './configs/LoggerDOMConfigurator_04.xml'
      ),     
       
  );
  
  define('MY_CONSTANT', 'hello world!');
  
  require_once('../test_core.php');
  
  ?>