[
https://issues.apache.org/jira/browse/LOG4J2-607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14009081#comment-14009081
]
Remko Popma edited comment on LOG4J2-607 at 10/18/15 2:09 PM:
--------------------------------------------------------------
I'm not sure if this is the same problem, but if I set my json like this:
{code}
"properties": {
"property": {
"name":"FileName",
"value":"test.log"
},
"property": {
"name":"LogFileLocation",
"value":"/home/ssimen/logs",
"xvalue":"${sys:user.home}/logs"
}
},
{code}
then the LogFileLocation is set properly. If I change the order then FileName
is set properly.
It looks to me that "properties" should be a JSON array instead of an object.
was (Author: [email protected]):
I'm not sure if this is the same problem, but if I set my json like this:
"properties": {
"property": {
"name":"FileName",
"value":"test.log"
},
"property": {
"name":"LogFileLocation",
"value":"/home/ssimen/logs",
"xvalue":"${sys:user.home}/logs"
}
},
then the LogFileLocation is set properly. If I change the order then FileName
is set properly.
It looks to me that "properties" should be a JSON array instead of an object.
> log4j2 json files do not support property substitutions
> -------------------------------------------------------
>
> Key: LOG4J2-607
> URL: https://issues.apache.org/jira/browse/LOG4J2-607
> Project: Log4j 2
> Issue Type: Bug
> Affects Versions: 2.0-rc1, 2.0-rc2
> Environment: Windows 7, JVM 7, Tomcat 7. Also tested using Mac OS X
> and JVM 8 (Tomcat 7).
> Reporter: Sebastian Audet
> Attachments: log4j2.json
>
>
> Using Property substitution in the latest release candidate doesn't work in
> JSON configuration files.
> Seems to work fine in XML files though - suggest actually parsing the results
> of the JSON file configurations?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]