[
https://issues.apache.org/jira/browse/LOG4J2-554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13915918#comment-13915918
]
Russell J. Nile commented on LOG4J2-554:
----------------------------------------
Remko,
There is nothing significant about the 'config' folder (personal convention),
but I am able to specify "/WEB-INF/config/applicationContext.xml" in the
web.xml for Spring and it finds the configuration file just fine:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/config/applicationContext.xml
</param-value>
</context-param>
it generally treats the leading "/" as the root of the war file.
My hopes was that the log4jconfiguration would work similarly:
<context-param>
<param-name>log4jConfiguration</param-name>
<param-value>/WEB-INF/config/log4j2.xml</param-value>
</context-param>
but it does not find the configuration file nor does it report that it can't
find it....it just doesn't work.
I also tried this with rc1 and the same result (although it seems to behave a
bit more consistently than with beta9...I used to get notices about a bad URI).
NOTE: I do see this message when using rc1 that I don't remember when I used
beta9...should I open another ticket for that?: 10:46:20,606 ERROR [stderr]
(default task-3) ERROR StatusLogger Could not search jar file
'C:\dev\wildfly-8.0.0.Final\standalone\deployments\CTMSApplicationServices.war\WEB-INF\lib\log4j-core-2.0-rc1.jar\org\apache\logging\log4j\core'
for classes matching criteria: annotated with @Plugin file not found
It seems I only see this when I have the
<param-name>log4jConfiguration</param-name> in the web.xml though.
When I put the log4j2.xml in the classpath (/classes) everything works
fine....but I like putting my configuration files all together.
> 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]