RFR 8159245: Loggers created by system classes are not initialized correctly when configured programmatically from application code.
Mandy Chung
mandy.chung at oracle.com
Tue Jun 21 16:01:17 UTC 2016
> On Jun 21, 2016, at 8:39 AM, Daniel Fuchs <daniel.fuchs at oracle.com> wrote:
>
> I don't understand this scenario.
> ConfigurationData should remain as simple as possible.
> Logger.getLogger() / LogManager.demandSystemLogger() will never return
> a logger before it has been configured.
> When we're merging the configuration data the system logger has
> not been configured yet. Level etc are already volatile in Logger and
> we should not introduce any new synchronization there.
This is the scenario I was thinking about - would this ever happen?
T1 is creating a system logger named “foo” and calling this.importConfg(other) at line 462 after setLevel(otherLevel) is done.
this is the system logger “foo” and other is the user-created logger “foo”.
T2 is calling other.setLevel(newLevel) on user-created logger “foo”.
Mandy
More information about the core-libs-dev
mailing list