[ https://issues.apache.org/jira/browse/LOG4J2-2005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16138694#comment-16138694 ]
Gary Gregory commented on LOG4J2-2005: -------------------------------------- Thinking about this a little more: - the stock level names are case-insensitive. - the custom level names are documented as case-sensitive. These two don't play well together. Why not make custom level names case-insensitive? This should fix all of this. > 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)