You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@logging.apache.org by Gary Gregory <ga...@gmail.com> on 2019/04/01 20:49:19 UTC

[log4j] False warning

Hi All:

I'm seeing warnings like:

2019-04-01 16:44:22,044
com.rs.seagull.httpmonitor.test.NHttpReverseProxyTestRule$1 WARN
locateContext called with URI
file:///C:/git/rocket-agent/src/test/resources/log4j2-console-build.xml.
Existing LoggerContext has URI src/test/resources/log4j2-console-build.xml

There are in fact the same files.

WDYT? This should not be a warning right?

Gary

Re: [log4j] False warning

Posted by Ralph Goers <ra...@dslextreme.com>.
I should add that fixing this would be a lot lower on my priority list than a bunch of other Jira issues we have.

Ralph

> On Apr 1, 2019, at 2:57 PM, Ralph Goers <ra...@dslextreme.com> wrote:
> 
> So we have a logger context that was created with a relative URI. Something is now calling it with an absolute URI. The only way we would know if they are the same would be to convert the relative URI to absolute and see if they are the same.  This should be a warning if they do not resolve to the same file and I guess we don’t know they aren’t unless we go to the trouble of doing more than a string comparison.
> 
> Ralph
> 
>> On Apr 1, 2019, at 1:49 PM, Gary Gregory <ga...@gmail.com> wrote:
>> 
>> Hi All:
>> 
>> I'm seeing warnings like:
>> 
>> 2019-04-01 16:44:22,044
>> com.rs.seagull.httpmonitor.test.NHttpReverseProxyTestRule$1 WARN
>> locateContext called with URI
>> file:///C:/git/rocket-agent/src/test/resources/log4j2-console-build.xml.
>> Existing LoggerContext has URI src/test/resources/log4j2-console-build.xml
>> 
>> There are in fact the same files.
>> 
>> WDYT? This should not be a warning right?
>> 
>> Gary
> 



Re: [log4j] False warning

Posted by Ralph Goers <ra...@dslextreme.com>.
So we have a logger context that was created with a relative URI. Something is now calling it with an absolute URI. The only way we would know if they are the same would be to convert the relative URI to absolute and see if they are the same.  This should be a warning if they do not resolve to the same file and I guess we don’t know they aren’t unless we go to the trouble of doing more than a string comparison.

Ralph

> On Apr 1, 2019, at 1:49 PM, Gary Gregory <ga...@gmail.com> wrote:
> 
> Hi All:
> 
> I'm seeing warnings like:
> 
> 2019-04-01 16:44:22,044
> com.rs.seagull.httpmonitor.test.NHttpReverseProxyTestRule$1 WARN
> locateContext called with URI
> file:///C:/git/rocket-agent/src/test/resources/log4j2-console-build.xml.
> Existing LoggerContext has URI src/test/resources/log4j2-console-build.xml
> 
> There are in fact the same files.
> 
> WDYT? This should not be a warning right?
> 
> Gary