Log4php
  1. Log4php
  2. LOG4PHP-5

LoggerAppenderRollingFile unable to open file and append logs

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      PHP Version 5.2.1

      Description

      First, LoggerAppenderRollingFile::setFileName() tries to set parent property LoggerAppenderFile::$fileName which is private and therefor fails, resulting in an empty filename. Second, LoggerAppenderRollingFile::append() tries to access parent property LoggerAppenderFile::$fp which is also private, resulting to NULL.

      The easiest fix would be to set visibility for LoggerAppenderFile::$fileName and LoggerAppenderFile::$fp to protected.

        Activity

        Hide
        Michael Aichler added a comment -

        Patch for LoggerAppenderFile

        Show
        Michael Aichler added a comment - Patch for LoggerAppenderFile

          People

          • Assignee:
            Knut Urdalen
            Reporter:
            Michael Aichler
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development