[
https://issues.apache.org/jira/browse/LOG4PHP-61?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12735375#action_12735375
]
Christian Grobmeier commented on LOG4PHP-61:
--------------------------------------------
Hi
I had similar thoughts later.
But please have the following in mind: LogManager exists in log4j:
http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/LogManager.html
Looking at the code, LoggerManager and Logger duplicates several chunks of code
which makes it very complex. In my understanding it's overengineered and should
stick with one option. As I see no sense in LoggerManager too at the moment, I
would consdier to remove the LoggerManager and put the factory methods for
Logger instances where it belongs.
However, I only disagree to copy method signatures just they exist in log4j.
Log4j has some outdated methods in it, we should got them too. Additionally,
weird stuff like with LoggerManager should be cleaned up. At least we are in
PHP world, rules are a bit different.
Having said beeing said, I will review your patch. Lets start a discussion on
the dev mailinglist and thanks very much for bringing this up!
> Stick with log4j and allow Logger::getLogger(...)
> -------------------------------------------------
>
> Key: LOG4PHP-61
> URL: https://issues.apache.org/jira/browse/LOG4PHP-61
> Project: Log4php
> Issue Type: Improvement
> Components: Code
> Affects Versions: 2.2
> Reporter: Christian Hammers
> Priority: Minor
> Attachments: Logger.diff
>
>
> Hello
> Both log4j and JDK Logger are suggest using Logger::getLogger() as you can
> see in:
> http://java.sun.com/j2se/1.4.2/docs/guide/util/logging/overview.html
> http://logging.apache.org/log4j/1.2/manual.html
> I admit that I don't yet understand why there is a LoggerManager class and
> how it relates to the Logger class but we should try to copy & paste as much
> as possible from the existing
> log4j (and log4perl etc) projects. It's log4xxx nevertheless and what would
> be the benefit from a cross-language standard if we start diversing from it
> at the very first command :)
> A patch will be attached (I didn't try out if the phpdoc looks good)
> bye,
> -christian-
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.