JDK-6882376 : Add internal support for JRE implementation to eliminate the dependency on logging
  • Type: Bug
  • Component: other-libs
  • Sub-Component: other
  • Affected Version: 7
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2009-09-15
  • Updated: 2011-06-13
  • Resolved: 2009-09-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b73Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
There are many classes using java.util.logging to log messages to enhance the diagnosability.  java.util.logging is a good candidate to be separated out as a module. We need to eliminate the dependency of logging from certain core classes for JDK modularization.

In addition to the dependency issue, Loggers are always created even if no log message is expected in the default configuration.

When a Logger is created, it triggers the logging initialization and set up based on the given configuration.  Most of the JRE log messages are of fine or lower level. It means that by default (level=INFO), no log message will be output which is desireable. However, the logging facility is still being initialized even though in the default case because it has no way to determine if it is the default configuration or not until it reads the JAVA_HOME/lib/logging.properties.

So this fix should help the startup performance (may not be significant though) as the logging facility is not initialized by default.

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/tl/jdk/rev/d3281fa8e46c
19-09-2009

EVALUATION Add a PlatformLogger class that mimics the default logging behavior (output the log message to System.err with simple formatting) and creates a java.util.logging.Logger only when the logging facility is used by the application or a user-defined configuration is supplied. JRE implementation can use the PlatformLogger class to log messages. To simplify the integration of this fix, this CR is filed for core-libs change. 6879044 is to track the AWT/2D/Swing changes to use the new PlatformLogger class.
15-09-2009