Hi Daniel,

On 1/22/18 8:47 AM, Daniel Fuchs wrote:

http://cr.openjdk.java.net/~dfuchs/webrev_8195096/webrev.01/
:
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.

So the cause of JDK-8191033 is because cx::addLocalLogger returns false when addLogger is called the first time to add the root and global logger and it causes that ".handlers" is not read and loaded for the root logger. It took me some time to understand what it's happening.  When addLocalLogger is called to add a logger, it calls ensureAllDefaultLoggers to ensure the root and global loggers are added first.  Do you think the handling of ".handlers" should be done in LoggerContext::ensureDefaultLogger?  Would that avoid the check to call loadLoggerHandlers if it's called from ensureLogManagerInitialized?   The code is getting quite complicated and if moving it closer to the place it adds the root logger would help.

thanks
Mandy

Reply via email to