Top Description Inners Fields Constructors Methods
org.junit.platform.commons.logging

public final Class LoggerFactory

extends Object
Class Inheritance
Annotations
@API
status:INTERNAL
since:1.0
Static Imports
org.apiguardian.api.API.Status.INTERNAL

Factory for the Logger facade for JUL.
Since
1.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static final Set<LogRecordListener>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static void
addListener(LogRecordListener listener)

Add the supplied LogRecordListener to the set of registered listeners.

public static Logger

Returns:

the logger
getLogger
(Class<?>
the class for which to get the logger; never null
clazz
)

Get a Logger for the specified class.

public static void
removeListener(LogRecordListener listener)

Remove the supplied LogRecordListener from the set of registered listeners.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

listenersback to summary
private static final Set<LogRecordListener> listeners

Constructor Detail

LoggerFactoryback to summary
private LoggerFactory()

Method Detail

addListenerback to summary
public static void addListener(LogRecordListener listener)

Add the supplied LogRecordListener to the set of registered listeners.

getLoggerback to summary
public static Logger getLogger(Class<?> clazz)

Get a Logger for the specified class.

Parameters
clazz:Class<?>

the class for which to get the logger; never null

Returns:Logger

the logger

Annotations
@SuppressWarnings:ConstantValue
removeListenerback to summary
public static void removeListener(LogRecordListener listener)

Remove the supplied LogRecordListener from the set of registered listeners.

org.junit.platform.commons.logging back to summary

private final Class LoggerFactory.DelegatingLogger

extends Object
implements Logger
Class Inheritance
  • java.lang.Object
  • org.junit.platform.commons.logging.LoggerFactory.DelegatingLogger
All Implemented Interfaces
org.junit.platform.commons.logging.Logger

Field Summary

Modifier and TypeField and Description
private static final String
private final java.util.logging.Logger
private final String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
config(Supplier<String> messageSupplier)

Implements org.junit.platform.commons.logging.Logger.config.

Log the message from the provided messageSupplier at config level.

public void
config(@Nullable Throwable throwable, Supplier<String> messageSupplier)

private java.util.logging.LogRecord
createLogRecord(java.util.logging.Level level, @Nullable Throwable throwable, String message)

public void
debug(Supplier<String> messageSupplier)

Implements org.junit.platform.commons.logging.Logger.debug.

Log the message from the provided messageSupplier at debug level.

public void
debug(@Nullable Throwable throwable, Supplier<String> messageSupplier)

public void
error(Supplier<String> messageSupplier)

Implements org.junit.platform.commons.logging.Logger.error.

Log the message from the provided messageSupplier at error level.

public void
error(@Nullable Throwable throwable, Supplier<String> messageSupplier)

public void
info(Supplier<String> messageSupplier)

Implements org.junit.platform.commons.logging.Logger.info.

Log the message from the provided messageSupplier at info level.

public void
info(@Nullable Throwable throwable, Supplier<String> messageSupplier)

private void
log(java.util.logging.Level level, @Nullable Throwable throwable, Supplier<String> messageSupplier)

public void
trace(Supplier<String> messageSupplier)

Implements org.junit.platform.commons.logging.Logger.trace.

Log the message from the provided messageSupplier at trace level.

public void
trace(@Nullable Throwable throwable, Supplier<String> messageSupplier)

public void
warn(Supplier<String> messageSupplier)

Implements org.junit.platform.commons.logging.Logger.warn.

Log the message from the provided messageSupplier at warning level.

public void
warn(@Nullable Throwable throwable, Supplier<String> messageSupplier)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

FQCNback to summary
private static final String FQCN
julLoggerback to summary
private final java.util.logging.Logger julLogger
nameback to summary
private final String name

Constructor Detail

DelegatingLoggerback to summary
pack-priv DelegatingLogger(String name)

Method Detail

configback to summary
public void config(Supplier<String> messageSupplier)

Implements org.junit.platform.commons.logging.Logger.config.

Doc from org.junit.platform.commons.logging.Logger.config.

Log the message from the provided messageSupplier at config level.

Maps to java.util.logging.Level#CONFIG in JUL.

Annotations
@Override
configback to summary
public void config(@Nullable Throwable throwable, Supplier<String> messageSupplier)
Annotations
@Override
createLogRecordback to summary
private java.util.logging.LogRecord createLogRecord(java.util.logging.Level level, @Nullable Throwable throwable, String message)
debugback to summary
public void debug(Supplier<String> messageSupplier)

Implements org.junit.platform.commons.logging.Logger.debug.

Doc from org.junit.platform.commons.logging.Logger.debug.

Log the message from the provided messageSupplier at debug level.

Maps to java.util.logging.Level#FINE in JUL.

Annotations
@Override
debugback to summary
public void debug(@Nullable Throwable throwable, Supplier<String> messageSupplier)
Annotations
@Override
errorback to summary
public void error(Supplier<String> messageSupplier)

Implements org.junit.platform.commons.logging.Logger.error.

Doc from org.junit.platform.commons.logging.Logger.error.

Log the message from the provided messageSupplier at error level.

Maps to java.util.logging.Level#SEVERE in JUL.

Annotations
@Override
errorback to summary
public void error(@Nullable Throwable throwable, Supplier<String> messageSupplier)
Annotations
@Override
infoback to summary
public void info(Supplier<String> messageSupplier)

Implements org.junit.platform.commons.logging.Logger.info.

Doc from org.junit.platform.commons.logging.Logger.info.

Log the message from the provided messageSupplier at info level.

Maps to java.util.logging.Level#INFO in JUL.

Annotations
@Override
infoback to summary
public void info(@Nullable Throwable throwable, Supplier<String> messageSupplier)
Annotations
@Override
logback to summary
private void log(java.util.logging.Level level, @Nullable Throwable throwable, Supplier<String> messageSupplier)
traceback to summary
public void trace(Supplier<String> messageSupplier)

Implements org.junit.platform.commons.logging.Logger.trace.

Doc from org.junit.platform.commons.logging.Logger.trace.

Log the message from the provided messageSupplier at trace level.

Maps to java.util.logging.Level#FINER in JUL.

Annotations
@Override
traceback to summary
public void trace(@Nullable Throwable throwable, Supplier<String> messageSupplier)
Annotations
@Override
warnback to summary
public void warn(Supplier<String> messageSupplier)

Implements org.junit.platform.commons.logging.Logger.warn.

Doc from org.junit.platform.commons.logging.Logger.warn.

Log the message from the provided messageSupplier at warning level.

Maps to java.util.logging.Level#WARNING in JUL.

Annotations
@Override
warnback to summary
public void warn(@Nullable Throwable throwable, Supplier<String> messageSupplier)
Annotations
@Override