Log4php
  1. Log4php
  2. LOG4PHP-67

Refactoring: Use Logger instead of LoggerManager

    Details

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

      Description

      Reading: http://logging.apache.org/log4j/1.2/manual.html

      While Log4PHP is always speaking of LoggerManager::getLogger, Log4J
      uses: Logger.getLogger.
      There is actually a LogManager class available in Log4J, but I couldn't
      find any reference from the documentation to it. I guess it's the
      preferred way of Log4J to use Logger.getLogger().

      In Log4php you can currently use Logger class to retrieve a logger. Is
      redirecting this request to the loggerManager, which returns the
      LoggerHierarchy which returns the actual logger.

      You can also use the LoggerManager directly to retrieve a Logger.

      This is confusing. What should one use? Why two ways? I hardly see a
      benefit in having the LoggerManager class. Its just defining the
      classloader and references to the LoggerHierarchy.

      As discussed on the mailinglist, LoggerManager should be removed and Logger class
      should be used instead.

        Activity

        No work has yet been logged on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development