APIdia Launch Partner
Top Description Inners Fields Constructors Methods
jdk.internal.logger

public final Class BootstrapLogger

extends Object
implements Logger, Bridge, ConfigurableBridge
Class Inheritance
All Implemented Interfaces
sun.util.logging.PlatformLogger.ConfigurableBridge, sun.util.logging.PlatformLogger.Bridge, java.lang.System.Logger
Imports
java.util.HashMap, .Iterator, .Map, .ResourceBundle, .ServiceLoader, .Objects, java.util.function.BooleanSupplier, .Function, .Supplier, java.lang.System.LoggerFinder, .System.Logger, java.lang.ref.WeakReference, java.util.concurrent.ExecutionException, .ExecutorService, .LinkedBlockingQueue, .ThreadFactory, .ThreadPoolExecutor, .TimeUnit, jdk.internal.misc.InnocuousThread, .VM, sun.util.logging.PlatformLogger, jdk.internal.logger.LazyLoggers.LazyLoggerAccessor

The BootstrapLogger class handles all the logic needed by Lazy Loggers to delay the creation of System.Logger instances until the VM is booted. By extension - it also contains the logic that will delay the creation of JUL Loggers until the LogManager is initialized by the application, in the common case where JUL is the default and there is no custom JUL configuration. A BootstrapLogger instance is both a Logger and a PlatformLogger.Bridge instance, which will put all Log messages in a queue until the VM is booted. Once the VM is booted, it obtain the real System.Logger instance from the LoggerFinder and flushes the message to the queue. There are a few caveat: - the queue may not be flush until the next message is logged after the VM is booted - while the BootstrapLogger is active, the default implementation for all convenience methods is used - PlatformLogger.setLevel calls are ignored

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class
pack-priv static class
private static enum
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv final LazyLoggers.LazyLoggerAccessor
private static volatile BooleanSupplier
pack-priv final BooleanSupplier
private static volatile boolean

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv static void
pack-priv boolean

Returns:

true if the VM is still bootstrapping.
checkBootstrapping
()

Check whether the VM is still bootstrapping, and if not, arranges for this logger's holder to create the real logger and flush the pending event queue.

pack-priv static synchronized System.Logger
pack-priv static void
pack-priv void
pack-priv static System.Logger
public PlatformLogger.ConfigurableBridge.LoggerConfiguration
public String

Returns:

The logger name.
getName
()

Implements java.lang.System.Logger.getName, sun.util.logging.PlatformLogger.Bridge.getName.

The name of this logger.

pack-priv static boolean
public static boolean
public boolean
pack-priv boolean
public boolean
isLoggable(System.Logger.Level level)

Implements java.lang.System.Logger.isLoggable.

Checks if a message of the given level would be logged by this logger.

public boolean
isLoggable(PlatformLogger.Level level)

Implements sun.util.logging.PlatformLogger.Bridge.isLoggable.

Returns true if a message of the given level would actually be logged by this logger.

public void
log(System.Logger.Level level, ResourceBundle bundle, String key, Throwable thrown)

Implements java.lang.System.Logger.log.

Logs a localized message associated with a given throwable.

public void
log(System.Logger.Level level, ResourceBundle bundle, String format, Object... params)

Implements java.lang.System.Logger.log.

Logs a message with resource bundle and an optional list of parameters.

public void
log(System.Logger.Level level, String msg, Throwable thrown)

Overrides default java.lang.System.Logger.log.

Logs a message associated with a given throwable.

public void
log(System.Logger.Level level, String format, Object... params)

Overrides default java.lang.System.Logger.log.

Logs a message with an optional list of parameters.

public void
log(System.Logger.Level level, Supplier<String> msgSupplier)

Overrides default java.lang.System.Logger.log.

Logs a lazily supplied message.

public void
log(System.Logger.Level level, Object obj)

Overrides default java.lang.System.Logger.log.

Logs a message produced from the given object.

public void
log(System.Logger.Level level, String msg)

Overrides default java.lang.System.Logger.log.

Logs a message.

public void
log(System.Logger.Level level, Supplier<String> msgSupplier, Throwable thrown)

Overrides default java.lang.System.Logger.log.

Logs a lazily supplied message associated with a given throwable.

public void
public void
public void
public void
public void
public void
logp(PlatformLogger.Level level, String sourceClass, String sourceMethod, String msg)

Implements sun.util.logging.PlatformLogger.Bridge.logp.

public void
logp(PlatformLogger.Level level, String sourceClass, String sourceMethod, Supplier<String> msgSupplier)

Implements sun.util.logging.PlatformLogger.Bridge.logp.

public void
logp(PlatformLogger.Level level, String sourceClass, String sourceMethod, String msg, Object... params)

Implements sun.util.logging.PlatformLogger.Bridge.logp.

public void
logp(PlatformLogger.Level level, String sourceClass, String sourceMethod, String msg, Throwable thrown)

Implements sun.util.logging.PlatformLogger.Bridge.logp.

public void
logp(PlatformLogger.Level level, String sourceClass, String sourceMethod, Throwable thrown, Supplier<String> msgSupplier)

Implements sun.util.logging.PlatformLogger.Bridge.logp.

public void
logrb(PlatformLogger.Level level, String sourceClass, String sourceMethod, ResourceBundle bundle, String msg, Object... params)

Implements sun.util.logging.PlatformLogger.Bridge.logrb.

public void
logrb(PlatformLogger.Level level, String sourceClass, String sourceMethod, ResourceBundle bundle, String msg, Throwable thrown)

Implements sun.util.logging.PlatformLogger.Bridge.logrb.

public void
public void
pack-priv void
public static void
private static synchronized Map<LazyLoggers.LazyLoggerAccessor, SurrogateLogger>
public static boolean
private static boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait