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

        Christian Grobmeier created issue -
        Christian Grobmeier made changes -
        Field Original Value New Value
        Fix Version/s 2.3 [ 12314855 ]
        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.
        Ivan Habunek made changes -
        Attachment LoggerMDC.refactor.patch [ 12442951 ]
        Attachment LoggerMDCTest.patch [ 12442952 ]
        Ivan Habunek made changes -
        Assignee Ivan Habunek [ juice ]
        Ivan Habunek made changes -
        Fix Version/s 2.3 [ 12314855 ]
        Affects Version/s 2.0 [ 12313916 ]
        Affects Version/s 2.2 [ 12313918 ]
        Fix Version/s 2.1 [ 12313917 ]
        Hide
        Ivan Habunek added a comment -

        Committed revision 998444.

        Show
        Ivan Habunek added a comment - Committed revision 998444.
        Ivan Habunek made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ivan Habunek made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development