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 "Florian Semm (Issue Comment Edited) (JIRA)" <ji...@apache.org> on 2011/11/15 08:41:51 UTC
[jira] [Issue Comment Edited] (LOG4PHP-162) Warning for invalid
appender threshold level never called
[ https://issues.apache.org/jira/browse/LOG4PHP-162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13150284#comment-13150284 ]
Florian Semm edited comment on LOG4PHP-162 at 11/15/11 7:40 AM:
----------------------------------------------------------------
i think all warnings which related to invalid-levels could be removed.
for instance the root-logger config :
if (isset($config['level'])) {
$level = LoggerLevel::toLevel($config['level']);
if (isset($level)) {
$logger->setLevel($level);
} else {
$default = $logger->getLevel();
$this->warn("Invalid logger level [{$config['level']}] specified for logger [$loggerName].");
}
}
$level is always set.
was (Author: floriansemm):
i think all warnings which related to invalid-levels could be removed.
for instance the root-logger config :
{code}
if (isset($config['level'])) {
$level = LoggerLevel::toLevel($config['level']);
if (isset($level)) {
$logger->setLevel($level);
} else {
$default = $logger->getLevel();
$this->warn("Invalid logger level [{$config['level']}] specified for logger [$loggerName].");
}
}
{code}
$level is always set.
> Warning for invalid appender threshold level never called
> ---------------------------------------------------------
>
> Key: LOG4PHP-162
> URL: https://issues.apache.org/jira/browse/LOG4PHP-162
> Project: Log4php
> Issue Type: Improvement
> Components: Code
> Affects Versions: 2.1
> Reporter: Florian Semm
> Priority: Minor
> Fix For: 2.2
>
>
> appender config:
> <appender name="foo" class="LoggerAppenderConsole" threshold="FOO" />
> Expected warning: "Invalid threshold value [FOO]..."
> LoggerLevel::toLevel() return always level-debug if default-level is null. If the threshold unknow the default-level (debug in this case) will be returned. There is no need for this warning in line 266-267 LoggerConfigurator.
--
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