You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Brett Walker <br...@geometry.com.au> on 2019/12/17 12:21:42 UTC

Backwards incompatiable changes introduced in 2.13.0?

Hi List,


Prior to 2.13.0 I was shutting down Log4J2 using:

    LogManager.shutdown();


I had to do this to release files during a unit testing to release locks on files.


After upgrading to 2.13.0 this broken some unit tests which were now failing because test pre-conditions could not delete files due to them having active locks.


I was able to resolve this by replacing the above with the following:

    LogManager.shutdown(LogManager.getContext(false));


I was able to determine that this change was introduced by LOG4J2-2716 (253ada6ff2fb6c6a0dcfee8ed432372215f2ef78).


Is this change an intended consequence of LOG4J2-2716, or an unforeseen side effect?

Will the FAQ need to be updated (https://logging.apache.org/log4j/2.0/faq.html#shutdown)?


Brett Walker


Re: Backwards incompatiable changes introduced in 2.13.0?

Posted by Brett Walker <br...@geometry.com.au>.
Hi Ralph,


I have attached a self contained test of the problem I have encountered in an attachment called Log4j Shutdown Example.zip


Hope this help,

Brett


________________________________
From: Ralph Goers <ra...@dslextreme.com>
Sent: Wednesday, 18 December 2019 12:13 AM
To: Log4J Users List
Subject: Re: Backwards incompatiable changes introduced in 2.13.0?

Thanks for letting us know. I will check into this as soon as I can.

Ralph

> On Dec 17, 2019, at 5:21 AM, Brett Walker <br...@geometry.com.au> wrote:
>
> Hi List,
>
>
> Prior to 2.13.0 I was shutting down Log4J2 using:
>
>    LogManager.shutdown();
>
>
> I had to do this to release files during a unit testing to release locks on files.
>
>
> After upgrading to 2.13.0 this broken some unit tests which were now failing because test pre-conditions could not delete files due to them having active locks.
>
>
> I was able to resolve this by replacing the above with the following:
>
>    LogManager.shutdown(LogManager.getContext(false));
>
>
> I was able to determine that this change was introduced by LOG4J2-2716 (253ada6ff2fb6c6a0dcfee8ed432372215f2ef78).
>
>
> Is this change an intended consequence of LOG4J2-2716, or an unforeseen side effect?
>
> Will the FAQ need to be updated (https://logging.apache.org/log4j/2.0/faq.html#shutdown)?
>
>
> Brett Walker
>



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


Re: Backwards incompatiable changes introduced in 2.13.0?

Posted by Ralph Goers <ra...@dslextreme.com>.
Thanks for letting us know. I will check into this as soon as I can.

Ralph

> On Dec 17, 2019, at 5:21 AM, Brett Walker <br...@geometry.com.au> wrote:
> 
> Hi List,
> 
> 
> Prior to 2.13.0 I was shutting down Log4J2 using:
> 
>    LogManager.shutdown();
> 
> 
> I had to do this to release files during a unit testing to release locks on files.
> 
> 
> After upgrading to 2.13.0 this broken some unit tests which were now failing because test pre-conditions could not delete files due to them having active locks.
> 
> 
> I was able to resolve this by replacing the above with the following:
> 
>    LogManager.shutdown(LogManager.getContext(false));
> 
> 
> I was able to determine that this change was introduced by LOG4J2-2716 (253ada6ff2fb6c6a0dcfee8ed432372215f2ef78).
> 
> 
> Is this change an intended consequence of LOG4J2-2716, or an unforeseen side effect?
> 
> Will the FAQ need to be updated (https://logging.apache.org/log4j/2.0/faq.html#shutdown)?
> 
> 
> Brett Walker
> 



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