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

LoggerAppenderConsole is initialized wrong

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.0
    • 2.0.0
    • Code
    • None

    Description

      Hello

      Using define('LOG4PHP_CONFIGURATOR_CLASS', 'LoggerConfiguratorBasic'); is supposed to configure
      log4php so that it prints on stdout. That currently does not happen as the $fp variable of the LoggerAppenderConsole
      class is never initialized via the setTarget() method.

      The LoggerConfiguratorInit does this with e.g. "log4php.appender.console.target = STDOUT" but here, too, I would
      strongly suggest making stdout the default!

      bye,

      christian

      Index: src/main/php/appenders/LoggerAppenderConsole.php
      ===================================================================
      — src/main/php/appenders/LoggerAppenderConsole.php (Revision 797819)
      +++ src/main/php/appenders/LoggerAppenderConsole.php (Arbeitskopie)
      @@ -51,7 +51,7 @@

      • @var mixed the resource used to open stdout/stderr
      • @access private
        */
      • protected $fp = false;
        + protected $fp = STDOUT;

      /**

      • Set console target.

      Attachments

        Activity

          People

            Unassigned Unassigned
            lathspell Christian Brunotte
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment