You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Gary Gregory (JIRA)" <ji...@apache.org> on 2015/02/20 17:17:22 UTC
[jira] [Resolved] (LOG4J2-957) Missing toUpperCase(Locale.ENGLISH)
[ https://issues.apache.org/jira/browse/LOG4J2-957?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary Gregory resolved LOG4J2-957.
---------------------------------
Resolution: Fixed
Pushed fix to git master. Please verify and close.
> Missing toUpperCase(Locale.ENGLISH)
> -----------------------------------
>
> Key: LOG4J2-957
> URL: https://issues.apache.org/jira/browse/LOG4J2-957
> Project: Log4j 2
> Issue Type: Bug
> Components: API
> Affects Versions: 2.1
> Environment: turkish locale, redhat, websphere
> Reporter: fatih guleryuz
> Priority: Critical
> Labels: critical
> Fix For: 2.2
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> setting level of logger as "info" in log4j2-cnfig.xml, whene initializing logger produces such an exception
> WARN Error while converting string [info] to type [class org.apache.logging.log4j.Level]. Using default value [null]. java.lang.IllegalArgumentException: Unknown level constant [İNFO].
> when i look at source the problem appears to be a forgotten Locale.ENGLISH in toUpperCase method
> class:
> org.apache.logging.log4j.Level
> method:
> public static Level valueOf(final String name) {
> if (name == null) {
> throw new NullPointerException("No level name given.");
> }
> final String levelName = name.toUpperCase();
> if (levels.containsKey(levelName)) {
> return levels.get(levelName);
> }
> throw new IllegalArgumentException("Unknown level constant [" + levelName + "].");
> }
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org