Hi,

Please find below a fix for

8030850: Setting .level=FINEST for the root logger in
         logging configuration file doesn't work

https://bugs.openjdk.java.net/browse/JDK-8030850

http://cr.openjdk.java.net/~dfuchs/webrev_8030850/webrev.00/

This is a regression I introduced with my fix for JDK-8026499.

The root logger sets its own level to "INFO" in its constructor.
Then later when the logger is added, it believes that its level
has already been initialized/set by the user and so skips its
initialization from the config file.
Setting the level of the root logger to INFO in the constructor
is too early.

The fix is very limited - instead of initializing the
root level to 'INFO' in the constructor, we can do it just
after having added it to the LogManager. At this time the
configuration is already read (happened a few lines above),
and thus we can set the level to its default value after
checking whether it's already been initialized.

There should be no synchronization issue since it all happens
in the same synchronization lock as before the fix - and the
logic ensures that the LogManager will not be published to other
threads until the initialization is done.

best regards,

-- daniel

Reply via email to