You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "member sound (JIRA)" <ji...@apache.org> on 2016/05/03 12:39:12 UTC

[jira] [Updated] (LOG4J2-1378) WebLookup fails with log4j-web dependency

     [ https://issues.apache.org/jira/browse/LOG4J2-1378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

member sound updated LOG4J2-1378:
---------------------------------
    Description: 
I'm using the log4j-web dependency for proper (de)-registration of the log4j2 logger in a tomcat environment:
{code}
<dependency>
    <groupId>org.apache.logging.log4j</groupId>
    <artifactId>log4j-web</artifactId>
</dependency>
{code}
Problem: then I cannot use WebLookup anymore as follows:
{code}
<RollingRandomAccessFile name="TEST" fileName="${web:rootDir}-${web:majorVersion}-application.log" ..>
{code}
When I exclude the log4j-web dependency, the weblookup works fine. But I have to use the dependency for proper tomcat logging.

Probably the lookup is initialized too late. 

Bug report as requested in: http://stackoverflow.com/questions/36998917/how-to-use-weblookup-with-log4j-web

  was:
I'm using the log4j-web dependency for proper (de)-registration of the log4j2 logger in a tomcat environment:

<dependency>
    <groupId>org.apache.logging.log4j</groupId>
    <artifactId>log4j-web</artifactId>
</dependency>

Problem: then I cannot use WebLookup anymore as follows:

<RollingRandomAccessFile name="TEST" fileName="${web:rootDir}-${web:majorVersion}-application.log" ..>

When I exclude the log4j-web dependency, the weblookup works fine. But I have to use the dependency for proper tomcat logging.

Probably the lookup is initialized too late. 

Bug report as requested in: http://stackoverflow.com/questions/36998917/how-to-use-weblookup-with-log4j-web


> WebLookup fails with log4j-web dependency
> -----------------------------------------
>
>                 Key: LOG4J2-1378
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1378
>             Project: Log4j 2
>          Issue Type: Bug
>         Environment: Java 1.8
>            Reporter: member sound
>
> I'm using the log4j-web dependency for proper (de)-registration of the log4j2 logger in a tomcat environment:
> {code}
> <dependency>
>     <groupId>org.apache.logging.log4j</groupId>
>     <artifactId>log4j-web</artifactId>
> </dependency>
> {code}
> Problem: then I cannot use WebLookup anymore as follows:
> {code}
> <RollingRandomAccessFile name="TEST" fileName="${web:rootDir}-${web:majorVersion}-application.log" ..>
> {code}
> When I exclude the log4j-web dependency, the weblookup works fine. But I have to use the dependency for proper tomcat logging.
> Probably the lookup is initialized too late. 
> Bug report as requested in: http://stackoverflow.com/questions/36998917/how-to-use-weblookup-with-log4j-web



--
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