[
https://issues.apache.org/jira/browse/LOG4J2-2005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16143352#comment-16143352
]
Paul Burrowes edited comment on LOG4J2-2005 at 8/28/17 4:22 AM:
----------------------------------------------------------------
Yes, case-insensitive comparison is acceptable to us so long as storage is
case-preserving. Other people may depend on case-sensitivity more but I expect
case-preserving is sufficient for all but the most unusual uses.
The TraceLevel class in slee-1.1.src.zip has:
{code}
public static final String INFO_STRING = "Info";
{code}
in toString():
{code}
case LEVEL_INFO: return INFO_STRING;
{code}
was (Author: pburrowesoc):
Yes, case-insensitive comparison is acceptable to us so long as storage is
case-preserving.The TraceLevel class in slee-1.1.src.zip has:
{code}
public static final String INFO_STRING = "Info";
{code}
in toString():
{code}
case LEVEL_INFO: return INFO_STRING;
{code}
> Level.valueOf() converts level strings to uppercase
> ---------------------------------------------------
>
> Key: LOG4J2-2005
> URL: https://issues.apache.org/jira/browse/LOG4J2-2005
> Project: Log4j 2
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.8.2
> Reporter: Paul Burrowes
>
> When using custom levels that are not all uppercase the serialized level
> strings are not deserializable back into levels because Level.valueOf()
> assumes all levels will be uppercase.
> https://logging.apache.org/log4j/2.x/manual/customloglevels.html says that
> levels are case sensitive and the convention is to use uppercase. Having the
> convention mandatory in code breaks all cases where the level name has
> already been standardised as mixed case.
> The fix is simple, Level.valueOf() should not convert levelName to uppercase.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)