[JDK 11] RFR: 8195096: Exception printed on console with custom LogManager on starting Apache Tomcat (original) (raw)
Daniel Fuchs daniel.fuchs at oracle.com
Sat Jan 20 13:17:35 UTC 2018
- Previous message: [JDK 11] RFR: 8195096: Exception printed on console with custom LogManager on starting Apache Tomcat
- Next message: [JDK 11] RFR: 8195096: Exception printed on console with custom LogManager on starting Apache Tomcat
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
On 19/01/18 20:56, Mark Thomas wrote:
On 19/01/18 20:14, Mark Thomas wrote:
Thanks to both of you for the hints that have got me thinking in new directions for a workaround. Thanks again for the hints. I have a work-around that seems to work: https://svn.apache.org/viewvc?view=revision&revision=1821708 It feels a bit hacky. I'd still prefer to be able to override addInitialRootLoggerHandlers() as that strikes me as a cleaner solution. Cheers, Mark
- Previous message: [JDK 11] RFR: 8195096: Exception printed on console with custom LogManager on starting Apache Tomcat
- Next message: [JDK 11] RFR: 8195096: Exception printed on console with custom LogManager on starting Apache Tomcat
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]