[
https://issues.apache.org/jira/browse/LOG4PHP-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13165941#comment-13165941
]
Ivan Habunek commented on LOG4PHP-98:
-------------------------------------
One of the standard ways of using log4php is one Logger per class, with
something like this in the constructor:
$this->log = Logger::getLogger(__CLASS__);
Then the user can configure the loggers they want in the config, but most
people will not configure each logger, like Moritz said.
Frankly, I don't think there is a need for a warning if someone fetches a
logger which is not specifically configured. I vote for "won't fix" on this
issue. Any oposition?
> Check for invalid names on getLogger call
> -----------------------------------------
>
> Key: LOG4PHP-98
> URL: https://issues.apache.org/jira/browse/LOG4PHP-98
> Project: Log4php
> Issue Type: Improvement
> Components: Code
> Affects Versions: 2.0
> Reporter: Florian Platzer
> Priority: Trivial
> Labels: call, check, fail, function, getlogger, initiate,
> instance, name
>
> When calling the Logger::getLogger function a name-check would be helpful.
> So, if someone defines the logger "L1" and calls $_logger =
> Logger::getLogger('L2'); an exception could be thrown
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira