Top Description Inners Fields Constructors Methods
org.jboss.logmanager

public Class JBossLoggerFinder

extends LoggerFinder
Class Inheritance
Imports
java.security.AccessController, .PrivilegedAction, java.util.EnumMap, .Map, .ResourceBundle, java.util.concurrent.atomic.AtomicBoolean, java.util.function.Supplier

Implements the System.LoggerFinder. It will make an attempt to set the java.util.logging.manager system property before a logger is accessed.
Author
James R. Perkins

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static final Map<System.Logger.Level, Level>
private static final AtomicBoolean
private static volatile boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public System.Logger
getLogger(final String
the name of the logger.
name
,
final Module
the module for which the logger is being requested.
module
)

Implements abstract java.lang.System.LoggerFinder.getLogger.

Returns an instance of Logger for the given module.

Inherited from java.lang.System.LoggerFinder:
getLocalizedLoggergetLoggerFinder

Field Detail

LEVELSback to summary
private static final Map<System.Logger.Level, Level> LEVELS
LOGGEDback to summary
private static final AtomicBoolean LOGGED
PROPERTY_SETback to summary
private static volatile boolean PROPERTY_SET

Constructor Detail

JBossLoggerFinderback to summary
public JBossLoggerFinder()

Method Detail

getLoggerback to summary
public System.Logger getLogger(final String name, final Module module)

Implements abstract java.lang.System.LoggerFinder.getLogger.

Doc from java.lang.System.LoggerFinder.getLogger.

Returns an instance of Logger for the given module.

Parameters
name:String

the name of the logger.

module:Module

the module for which the logger is being requested.

Returns:System.Logger

a logger suitable for use within the given module.

Annotations
@Override
org.jboss.logmanager back to summary

private Class JBossLoggerFinder.JBossSystemLogger

extends Object
implements Logger
Class Inheritance
All Implemented Interfaces
java.lang.System.Logger

Field Summary

Modifier and TypeField and Description
private final Logger
private static final String

Constructor Summary

AccessConstructor and Description
private
JBossSystemLogger(final Logger delegate)

Method Summary

Modifier and TypeMethod and Description
public String
getName()

Implements java.lang.System.Logger.getName.

Returns the name of this logger.

public boolean
isLoggable(final System.Logger.Level
the log message level.
level
)

Implements java.lang.System.Logger.isLoggable.

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

public void
log(final System.Logger.Level
the log message level.
level
,
final String
the string message (or a key in the message catalog, if this logger is a localized logger); can be null.
msg
)

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

Logs a message.

public void
log(final System.Logger.Level
the log message level.
level
,
final Supplier<String>
a supplier function that produces a message.
msgSupplier
)

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

Logs a lazily supplied message.

public void
log(final System.Logger.Level
the log message level.
level
,
final Object
the object to log.
obj
)

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

Logs a message produced from the given object.

public void
log(final System.Logger.Level
the log message level.
level
,
final String
the string message (or a key in the message catalog, if this logger is a localized logger); can be null.
msg
,
final Throwable
a Throwable associated with the log message; can be null.
thrown
)

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

Logs a message associated with a given throwable.

public void
log(final System.Logger.Level
one of the log message level identifiers.
level
,
final Supplier<String>
a supplier function that produces a message.
msgSupplier
,
final Throwable
a Throwable associated with log message; can be null.
thrown
)

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

Logs a lazily supplied message associated with a given throwable.

public void
log(final System.Logger.Level
one of the log message level identifiers.
level
,
final String
the string message format in java.text.MessageFormat format, (or a key in the message catalog, if this logger is a localized logger); can be null.
format
,
final Object...
an optional list of parameters to the message (may be none).
params
)

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

Logs a message with an optional list of parameters.

public void
log(final System.Logger.Level
the log message level.
level
,
final ResourceBundle
a resource bundle to localize msg; can be null.
bundle
,
final String
the string message (or a key in the message catalog, if bundle is not null); can be null.
msg
,
final Throwable
a Throwable associated with the log message; can be null.
thrown
)

Implements java.lang.System.Logger.log.

Logs a localized message associated with a given throwable.

public void
log(final System.Logger.Level
the log message level.
level
,
final ResourceBundle
a resource bundle to localize format; can be null.
bundle
,
final String
the string message format in java.text.MessageFormat format, (or a key in the message catalog if bundle is not null); can be null.
format
,
final Object...
an optional list of parameters to the message (may be none).
params
)

Implements java.lang.System.Logger.log.

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

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

delegateback to summary
private final Logger delegate
LOGGER_CLASS_NAMEback to summary
private static final String LOGGER_CLASS_NAME

Constructor Detail

JBossSystemLoggerback to summary
private JBossSystemLogger(final Logger delegate)

Method Detail

getNameback to summary
public String getName()

Implements java.lang.System.Logger.getName.

Doc from java.lang.System.Logger.getName.

Returns the name of this logger.

Returns:String

the logger name.

Annotations
@Override
isLoggableback to summary
public boolean isLoggable(final System.Logger.Level level)

Implements java.lang.System.Logger.isLoggable.

Doc from java.lang.System.Logger.isLoggable.

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

Parameters
level:System.Logger.Level

the log message level.

Returns:boolean

true if the given log message level is currently being logged.

Annotations
@Override
logback to summary
public void log(final System.Logger.Level level, final String msg)

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

Doc from java.lang.System.Logger.log.

Logs a message.

Parameters
level:System.Logger.Level

the log message level.

msg:String

the string message (or a key in the message catalog, if this logger is a localized logger); can be null.

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

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

Doc from java.lang.System.Logger.log.

Logs a lazily supplied message. If the logger is currently enabled for the given log message level then a message is logged that is the result produced by the given supplier function. Otherwise, the supplier is not operated on.

Parameters
level:System.Logger.Level

the log message level.

msgSupplier:Supplier<String>

a supplier function that produces a message.

logback to summary
public void log(final System.Logger.Level level, final Object obj)

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

Doc from java.lang.System.Logger.log.

Logs a message produced from the given object. If the logger is currently enabled for the given log message level then a message is logged that, by default, is the result produced from calling toString on the given object. Otherwise, the object is not operated on.

Parameters
level:System.Logger.Level

the log message level.

obj:Object

the object to log.

logback to summary
public void log(final System.Logger.Level level, final String msg, final Throwable thrown)

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

Doc from java.lang.System.Logger.log.

Logs a message associated with a given throwable.

Parameters
level:System.Logger.Level

the log message level.

msg:String

the string message (or a key in the message catalog, if this logger is a localized logger); can be null.

thrown:Throwable

a Throwable associated with the log message; can be null.

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

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

Doc from java.lang.System.Logger.log.

Logs a lazily supplied message associated with a given throwable. If the logger is currently enabled for the given log message level then a message is logged that is the result produced by the given supplier function. Otherwise, the supplier is not operated on.

Parameters
level:System.Logger.Level

one of the log message level identifiers.

msgSupplier:Supplier<String>

a supplier function that produces a message.

thrown:Throwable

a Throwable associated with log message; can be null.

logback to summary
public void log(final System.Logger.Level level, final String format, final Object... params)

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

Doc from java.lang.System.Logger.log.

Logs a message with an optional list of parameters.

Parameters
level:System.Logger.Level

one of the log message level identifiers.

format:String

the string message format in java.text.MessageFormat format, (or a key in the message catalog, if this logger is a localized logger); can be null.

params:Object[]

an optional list of parameters to the message (may be none).

logback to summary
public void log(final System.Logger.Level level, final ResourceBundle bundle, final String msg, final Throwable thrown)

Implements java.lang.System.Logger.log.

Doc from java.lang.System.Logger.log.

Logs a localized message associated with a given throwable. If the given resource bundle is non-null, the msg string is localized using the given resource bundle. Otherwise the msg string is not localized.

Parameters
level:System.Logger.Level

the log message level.

bundle:ResourceBundle

a resource bundle to localize msg; can be null.

msg:String

the string message (or a key in the message catalog, if bundle is not null); can be null.

thrown:Throwable

a Throwable associated with the log message; can be null.

Annotations
@Override
logback to summary
public void log(final System.Logger.Level level, final ResourceBundle bundle, final String format, final Object... params)

Implements java.lang.System.Logger.log.

Doc from java.lang.System.Logger.log.

Logs a message with resource bundle and an optional list of parameters. If the given resource bundle is non-null, the format string is localized using the given resource bundle. Otherwise the format string is not localized.

Parameters
level:System.Logger.Level

the log message level.

bundle:ResourceBundle

a resource bundle to localize format; can be null.

format:String

the string message format in java.text.MessageFormat format, (or a key in the message catalog if bundle is not null); can be null.

params:Object[]

an optional list of parameters to the message (may be none).

Annotations
@Override