You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Ralph Goers (JIRA)" <ji...@apache.org> on 2017/11/02 04:39:01 UTC

[jira] [Commented] (LOG4J2-2094) Specifying log4jConfiguration in web.xml fails on Windows when the file's path contains vm options

    [ https://issues.apache.org/jira/browse/LOG4J2-2094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16235163#comment-16235163 ] 

Ralph Goers commented on LOG4J2-2094:
-------------------------------------

Can you please try 
{code}
<param-value>file:///${sys:SYSTEM_HOME}/etc/properties/log4j2.xml</param-value>
{code}
and see if that works any better?

> Specifying log4jConfiguration in web.xml fails on Windows when the file's path contains vm options
> --------------------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-2094
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2094
>             Project: Log4j 2
>          Issue Type: Bug
>         Environment: Windows 10, jetty 9.4.7.v20170914 , Java 8, log4j 2.9.1
>            Reporter: jinyanan
>            Priority: Minor
>
> when I code my web.xml like this
> {code:java}
> <context-param>
>     <param-name>log4jConfiguration</param-name>
>     <param-value>file:///${SYSTEM_HOME}/etc/properties/log4j2.xml</param-value>
>   </context-param>
> {code}
> I get exception like 
> {code:java}
> ERROR StatusLogger Unable to access file:///$%7BSYSTEM_HOME%7D/etc/properties/log4j2.xml
>  java.io.FileNotFoundException: \${SYSTEM_HOME}\etc\properties\log4j2.xml (系统找不到指定的路径。)
> {code}
> I set my SYSTEM_HOME in my IntelliJ IDEA VM Options
> !http://wx4.sinaimg.cn/large/7dde05d2gy1fl3ikz7iqmj20uc0a4dgf.jpg!



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)