Top Description Classes
module java.base

Package jdk.internal.logger


[JDK INTERNAL] The jdk.internal.logger package defines an internal provider whose default naive implementation is replaced by the java.logging module when the java.logging module is present.

Default Implementation

The JDK default implementation of the System.LoggerFinder will attempt to load an installed instance of the jdk.internal.logger.DefaultLoggerFinder defined in this package. When the java.util.logging package is present, this will usually resolve to an instance of sun.util.logging.internal.LoggingProviderImpl - which provides an implementation of the Logger whose backend is a java.util.logging.Logger. Configuration can thus be performed by direct access to the regular java.util.logging APIs, using java.util.logging.Logger and java.util.logging.LogManager to access and configure the backend Loggers.
If however java.util.logging is not linked with the application, then the default implementation will return a simple logger that will print out all log messages of INFO level and above to the console (System.err), as implemented by the base jdk.internal.logger.DefaultLoggerFinder class.

Message Levels and Mapping to java.util.logging

The java.lang.System.LoggerFinder class documentation describe how System.Logger levels are mapped to JUL levels when java.util.logging is the backend.

Since
9
See Also
jdk.internal.logger.DefaultLoggerFinder, sun.util.logging.internal.LoggingProviderImpl, java.lang.System.LoggerFinder, java.lang.System.Logger, sun.util.logging.PlatformLogger.Bridge, sun.util.logging.internal

Class Summary

Modifier and TypeClass and Description
pack-priv abstract class
AbstractLoggerWrapper<
Type of the wrapped Logger: Logger or an extension of that interface.
L extends System.Logger
>

An implementation of System.Logger that redirects all calls to a wrapped instance of System.Logger

public class
BootstrapLogger

The BootstrapLogger class handles all the logic needed by Lazy Loggers to delay the creation of System.Logger instances until the VM is booted.

public class
DefaultLoggerFinder

Internal Service Provider Interface (SPI) that makes it possible to use java.util.logging as backend when the sun.util.logging.internal.LoggingProviderImpl is present.

public class
LazyLoggers

This class is a factory for Lazy Loggers; only system loggers can be Lazy Loggers.

public class
LocalizedLoggerWrapper<
Type of the wrapped Logger: Logger or an extension of the Logger interface.
L extends System.Logger
>

This implementation of Logger redirects all logging method calls to calls to log(Level, String, ResourceBundle, ...) methods, passing the Logger's ResourceBundle as parameter.

public class
LoggerFinderLoader

Helper class used to load the java.lang.System.LoggerFinder.

public class
LoggerWrapper<
Type of the wrapped Logger: Logger or an extension of that interface.
L extends System.Logger
>

An implementation of Logger that redirects all calls to a wrapped instance of Logger.

public class
SimpleConsoleLogger

A simple console logger to emulate the behavior of JUL loggers when in the default configuration.

public class
SurrogateLogger

A simple console logger used to emulate the behavior of JUL loggers when java.util.logging has no custom configuration.