You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4php-dev@logging.apache.org by "Ivan Habunek (Commented) (JIRA)" <ji...@apache.org> on 2011/12/09 09:36:41 UTC
[jira] [Commented] (LOG4PHP-98) Check for invalid names on
getLogger call
[ 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