You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "sunshaowei (Jira)" <ji...@apache.org> on 2021/01/26 09:13:00 UTC
[jira] [Commented] (LOG4J2-3005) log4j cannot correctly parse the
input Message which contains {}
[ https://issues.apache.org/jira/browse/LOG4J2-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17271987#comment-17271987 ]
sunshaowei commented on LOG4J2-3005:
------------------------------------
it's English version now.the API is LocationAwareLogger.log(null, Testlog, 30, message, argArray, null); Testlog is my class name. the message is {the param is: {"id":"123","name":{}}}, and argArray is {"id":"123","name":{}}
> log4j cannot correctly parse the input Message which contains {}
> ----------------------------------------------------------------
>
> Key: LOG4J2-3005
> URL: https://issues.apache.org/jira/browse/LOG4J2-3005
> Project: Log4j 2
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.13.2
> Reporter: sunshaowei
> Priority: Major
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> the input string is \{"id":"123","name":{}},if the value of name is empty,the called API *org.apache.logging.log4j.core.config.LoggerConfig#log(java.lang.String, java.lang.String, org.apache.logging.log4j.Marker, org.apache.logging.log4j.Level, org.apache.logging.log4j.message.Message, java.lang.Throwable)* will transfer the message to \{"id":"123","name":{id=123, name={}}}。so when after we called the API org.slf4j.spi.LocationAwareLogger#log,the output log is not the same as the input we expected.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)