Uploaded image for project: 'Log4php'
  1. Log4php
  2. LOG4PHP-36

Implement a LoggerPhpConfigurator

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.1.0
    • Code
    • None

    Description

      While having the possibility to configure log4php through OO, a property file or a XML file, we miss the option of providing configuration as a pure PHP config file which returns an array with all configuration.

      Here's an example of how I would like to configure log4php through a PHP array:

      <?php
      return array(
      'rootLogger' => array(
      'level' => 'DEBUG',
      'appender' => 'default',
      ),
      'appenders' => array(
      'default' => array(
      'class' => 'LoggerAppenderEcho',
      'layout' => array(
      'class' => 'LoggerPatternLayout',
      'conversionPattern' => "%d

      {Y-m-d H:i:s}

      %-5p %c %X

      {username}

      : %m in %F at %L%n",
      ),
      'filter' => array(
      'class' => 'LoggerLevelMatchFilter',
      'levelToMatch' => 'DEBUG',
      'acceptOnMatch' => false,
      ),
      ),
      ),
      );
      ?>

      Attachments

        Activity

          People

            Unassigned Unassigned
            kurdalen Knut Urdalen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: