[JDK 11] RFR: 8195096: Exception printed on console with custom LogManager on starting Apache Tomcat
jason_mehrens at hotmail.com
Mon Jan 22 21:30:09 UTC 2018
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.
From: core-libs-dev <core-libs-dev-bounces at openjdk.java.net> on behalf of Daniel Fuchs <daniel.fuchs at oracle.com>
Sent: Monday, January 22, 2018 10:47 AM
To: Mark Thomas; core-libs-dev at openjdk.java.net
Subject: Re: [JDK 11] RFR: 8195096: Exception printed on console with custom LogManager on starting Apache Tomcat
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
Mark - would you be able to help me with that?
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
More information about the core-libs-dev