Daniel,

Fantastic!  The patch looks good as is.  The only thing that sticks out is that 
both the 'if' and the 'else if' have the same code inside them.
That could be refactored a bit.

Jason
________________________________________
From: core-libs-dev <core-libs-dev-boun...@openjdk.java.net> on behalf of 
Daniel Fuchs <daniel.fu...@oracle.com>
Sent: Monday, January 22, 2018 10:47 AM
To: Mark Thomas; core-libs-dev@openjdk.java.net
Subject: Re: [JDK 11] RFR: 8195096: Exception printed on console with custom 
LogManager on starting Apache Tomcat

Hi guys,

Here is my second take at solving the issue.
There's no change in the public API (no CSR, Yay!),
and it shouldn't require any changes on the Tomcat
side. However I haven't tested my changes with Tomcat
yet.

Mark - would you be able to help me with that?

http://cr.openjdk.java.net/~dfuchs/webrev_8195096/webrev.01/

best regards,

-- daniel

On 20/01/2018 13:17, Daniel Fuchs wrote:
> Hi Mark,
>
> Thanks for these links and for trying out a solution.
>
>  > On 19/01/18 20:14, Mark Thomas wrote:
>  > Thanks again for the hints. I have a work-around that seems to work:
>  > https://svn.apache.org/viewvc?view=revision&revision=1821708
>
> I see... so what I think is happening is that in JDK 8, the
> handlers from ".handlers" where added to the root logger from
> within addLogger(rootLogger) and because ClassLoaderLogManager
> overrides LogManager::addLogger, then that part was skipped.
>
> In JDK 9 - that behavior changed - the handlers from ".handlers"
> were no longer added because the root logger was already present
> in the context when addLogger got called (that was a regression),
> but since  ClassLoaderLogManager overrides LogManager::addLogger
> anyway - it made no difference for ClassLoaderLogManager.
>
> In JDK 10, to fix the issue, I forced a call that would
> add the handlers from ".handlers" to the root logger, but
> because this now happens outside of addLogger(rootLogger) (just after)
> then ClassLoaderLogManager feels the difference.
>
> hmmm... let me think on this a bit more.
>
> best regards,
>
> -- daniel

Reply via email to