logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remko Popma (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (LOG4J2-1024) log4j2.xml not found by default in WEB-INF folder
Date Sun, 01 Nov 2015 16:25:28 GMT

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

Remko Popma edited comment on LOG4J2-1024 at 11/1/15 4:24 PM:
--------------------------------------------------------------

Wouldn't it be better to solve the original problem and remove the requirement for the *display-name*
parameter as presented in LOG4J2-873.

Currently *display-name* is the only reason *web.xml* is needed in a *Spring Boot + Log4j2*
application.


was (Author: lesliel):
Wouldn't it be better to solve the original problem and remove the requirement for the *display-name*
parameter as presented in [LOG4J2-873|https://issues.apache.org/jira/browse/LOG4J2-873].

Currently *display-name* is the only reason *web.xml* is needed in a *Spring Boot + Log4j2*
application.

> log4j2.xml not found by default in WEB-INF folder
> -------------------------------------------------
>
>                 Key: LOG4J2-1024
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1024
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Configurators
>    Affects Versions: 2.3
>         Environment: Tested on
> Windows 7 + Eclipse Juno + tomcat 7.0.62
> and
> CentOS 6.2 + tomcat 7.0.61
>            Reporter: Patrick Zimmermann
>            Assignee: Remko Popma
>            Priority: Minor
>             Fix For: 2.5
>
>
> I have a web application, included log4j-api-2.3, log4j-core-2.3 and log4j-web-2.3 and
placed a log4j2.xml file in the WEB-INF folder.
> On application startup I receive the following message:
>     ERROR StatusLogger No Log4j context configuration provided. This is very unusual.
>     ERROR StatusLogger No log4j2 configuration file found. Using default configuration:
logging only errors to the console.
> When I add
>       <context-param>
>           <param-name>log4jConfiguration</param-name>
>           <param-value>/WEB-INF/log4j2.xml</param-value>
>       </context-param>
> to my web.xml the error notification disappears.
> According to the documentation at http://logging.apache.org/log4j/2.x/manual/webapp.html
Log4J2 should search a file starting with log4j2 in the WEB-INF folder if no context-param
is specified.
> It seems, this does not happen.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message