Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.1.0
    • Component/s: Code
    • Labels:
      None

      Description

      http://ci.apache.org/projects/log4php/coverage-report/LoggerMDC.php.html

      This class still has global vars and needs some tweaks in general. Also there are no test cases in the repos at the moment

      1. LoggerMDC.refactor.patch
        2 kB
        Ivan Habunek
      2. LoggerMDCTest.patch
        6 kB
        Ivan Habunek

        Activity

        Hide
        Ivan Habunek added a comment -

        I refactored the LoggerMDC class and created tests (100% code coverage).

        Change log for LoggerMDC:

        • Moved mappings from a global variable to a private variable within the LoggerMDC class
        • Removed need for error suppression (@) in get method, error suppression is not a best practice in PHP
        • Changed access to environment vars from @_ENV['var'] to getenv('var'), because $_ENV is not populated on systems where environment variable hashing is disabled in php.ini (by ommiting "E" from the variables_order directive). I encountered this problem just by using the php.ini-recommended which comes with PHP.
        Show
        Ivan Habunek added a comment - I refactored the LoggerMDC class and created tests (100% code coverage). Change log for LoggerMDC: Moved mappings from a global variable to a private variable within the LoggerMDC class Removed need for error suppression (@) in get method, error suppression is not a best practice in PHP Changed access to environment vars from @_ENV ['var'] to getenv('var'), because $_ENV is not populated on systems where environment variable hashing is disabled in php.ini (by ommiting "E" from the variables_order directive). I encountered this problem just by using the php.ini-recommended which comes with PHP.
        Hide
        Ivan Habunek added a comment -

        Committed revision 998444.

        Show
        Ivan Habunek added a comment - Committed revision 998444.

          People

          • Assignee:
            Ivan Habunek
            Reporter:
            Christian Grobmeier
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development