Backwards incompatiable changes introduced in 2.13.0?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Backwards incompatiable changes introduced in 2.13.0?

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

Reply | Threaded
Open this post in threaded view
|

Re: Backwards incompatiable changes introduced in 2.13.0?

Ralph Goers
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 <[hidden email]> 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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Backwards incompatiable changes introduced in 2.13.0?

Brett Walker

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 <[hidden email]>
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 <[hidden email]> 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: [hidden email]
For additional commands, e-mail: [hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Log4J Shutdown Example.zip (4K) Download Attachment