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

Russell J. Nile commented on LOG4J2-554:
----------------------------------------

Remko,
It appears there is an inconsistency here; the log4j2 documentation specifies 
to use 'log4jConfiguration' 
(see:[1]http://logging.apache.org/log4j/2.x/manual/webapp.html#ContextParams) . 
 If I use the 'log4jConfiguration'and point to a physical location on my file 
system it does work.  The following in the web.xml works just fine.
    <context-param>
        <param-name>log4jConfiguration</param-name>
         
<param-value>file://c:/projects/SMS-CTMSApplication/CTMSApplicationServices/WebContent/WEB-INF/config/log4j2.xml</param-value>
 
    </context-param>

I understand how Log4J2 can not be customized for the web space per se 
(although the unique web-context key word 'log4jConfiguration' implies there is 
some web influence, or maybe that is just left over), but I think others will 
have a similar desire to do this. 
I am going to see if there is an environment variable I can use that might help 
me (e.g.: ${CurrentWARDirectory})


> No easy way to point to a configuration file in the WEB-INF folder
> ------------------------------------------------------------------
>
>                 Key: LOG4J2-554
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-554
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Configurators
>    Affects Versions: 2.0-beta9
>         Environment: WildFly 8.0.0, JDK 1.7.0_45, WIn7
>            Reporter: Russell J. Nile
>            Priority: Minor
>
> I am trying to put all of my configuration files under WEB-INF/config folder 
> but there is no way (other than an explicit reference to my file system) to 
> set the log4jConfiguration to point to that.  It also does not report any 
> errors when it can't find the file log4jConfiguration (unless there is a URI 
> reference error) so you are scratching your head when it does nothing.  



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to