RFR 8150840: Add an internal system property to control the default level of System.Logger when java.logging is not present.

Mandy Chung mandy.chung at oracle.com
Sat Mar 5 23:29:10 UTC 2016

> On Mar 4, 2016, at 9:05 AM, Daniel Fuchs <daniel.fuchs at oracle.com> wrote:
> http://cr.openjdk.java.net/~dfuchs/webrev_8150840/webrev.01/

Looks okay in general.  

I’m not a fan of using GetPropertyAction.  While it’s convenient as the class already exists, method refs and anonymous class makes what it does more explicit at the callsite.  No big deal.

Does -Djava.util.logging.SimpleFormatter.format=… have any effect if java.logging is absent (when used together with jdk.system.logger.level)?

It’s one of the test cases in SimpleConsoleLoggerTest.  I would expect java.util.logging.* properties are used fro java.util.logging configuration only.

JUL_FORMAT_PROP_KEY is defined in SimpleConsoleLogger.  If I read it correctly, it’s only used for the limited doPrivileged.
 472                     new PropertyPermission(JUL_FORMAT_PROP_KEY, "read"));

I was initially confused what SimpleConsoleLogger is done with java.util.logging formatting.  If JUL_FORMAT_PROP_KEY is not referenced anywhere else, perhaps just remove the constant variable and have a comment to explain this getSimpleFormat method is shared with JUL?


More information about the core-libs-dev mailing list