Top Description Inners Methods
reactor.util

public Interface Logger

Known Direct Implementers
reactor.util.Loggers.Slf4JLogger, reactor.util.Loggers.JdkLogger, reactor.util.Loggers.ConsoleLogger
Imports
java.util.function.Supplier

Logger interface designed for internal Reactor usage.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
Logger.ChoiceOfMessageSupplier

A kind of java.util.function.Predicate and Supplier mix, provides two variants of a message String depending on the level of detail desired.

Method Summary

Modifier and TypeMethod and Description
public void
debug(String
the message string to be logged
msg
)

Log a message at the DEBUG level.

public void
debug(String
the format string
format
,
Object...
a list of 3 or more arguments
arguments
)

Log a message at the DEBUG level according to the specified format and arguments.

public void
debug(String
the message accompanying the exception
msg
,
Throwable
the exception (throwable) to log
t
)

Log an exception (throwable) at the DEBUG level with an accompanying message.

public void
error(String
the message string to be logged
msg
)

Log a message at the ERROR level.

public void
error(String
the format string
format
,
Object...
a list of 3 or more arguments
arguments
)

Log a message at the ERROR level according to the specified format and arguments.

public void
error(String
the message accompanying the exception
msg
,
Throwable
the exception (throwable) to log
t
)

Log an exception (throwable) at the ERROR level with an accompanying message.

public default void
errorOrDebug(Logger.ChoiceOfMessageSupplier
the ChoiceOfMessageSupplier invoked in priority with true for the DEBUG level message, or false for ERROR level
messageSupplier
)

Convenience method to log a message that is different according to the log level.

public default void
errorOrDebug(Logger.ChoiceOfMessageSupplier
the ChoiceOfMessageSupplier invoked in priority with true for the DEBUG level message, or false for ERROR level
messageSupplier
,
Throwable
the Throwable the original exception to be logged
cause
)

Convenience method to log an exception (throwable), with an accompanying message that is different according to the log level.

public String

Returns:

name of this logger instance
getName
()

Return the name of this Logger instance.

public void
info(String
the message string to be logged
msg
)

Log a message at the INFO level.

public void
info(String
the format string
format
,
Object...
a list of 3 or more arguments
arguments
)

Log a message at the INFO level according to the specified format and arguments.

public void
info(String
the message accompanying the exception
msg
,
Throwable
the exception (throwable) to log
t
)

Log an exception (throwable) at the INFO level with an accompanying message.

public default void
infoOrDebug(Logger.ChoiceOfMessageSupplier
the ChoiceOfMessageSupplier invoked in priority with true for the DEBUG level message, or false for INFO level
messageSupplier
)

Convenience method to log a message that is different according to the log level.

public default void
infoOrDebug(Logger.ChoiceOfMessageSupplier
the ChoiceOfMessageSupplier invoked in priority with true for the DEBUG level message, or false for INFO level
messageSupplier
,
Throwable
the Throwable the original exception to be logged
cause
)

Convenience method to log an exception (throwable), with an accompanying message that is different according to the log level.

public boolean

Returns:

True if this Logger is enabled for the DEBUG level, false otherwise.
isDebugEnabled
()

Is the logger instance enabled for the DEBUG level?

public boolean

Returns:

True if this Logger is enabled for the ERROR level, false otherwise.
isErrorEnabled
()

Is the logger instance enabled for the ERROR level?

public boolean

Returns:

True if this Logger is enabled for the INFO level, false otherwise.
isInfoEnabled
()

Is the logger instance enabled for the INFO level?

public boolean

Returns:

True if this Logger is enabled for the TRACE level, false otherwise.
isTraceEnabled
()

Is the logger instance enabled for the TRACE level?

public boolean

Returns:

True if this Logger is enabled for the WARN level, false otherwise.
isWarnEnabled
()

Is the logger instance enabled for the WARN level?

public void
trace(String
the message string to be logged
msg
)

Log a message at the TRACE level.

public void
trace(String
the format string
format
,
Object...
a list of 3 or more arguments
arguments
)

Log a message at the TRACE level according to the specified format and arguments.

public void
trace(String
the message accompanying the exception
msg
,
Throwable
the exception (throwable) to log
t
)

Log an exception (throwable) at the TRACE level with an accompanying message.

public void
warn(String
the message string to be logged
msg
)

Log a message at the WARN level.

public void
warn(String
the format string
format
,
Object...
a list of 3 or more arguments
arguments
)

Log a message at the WARN level according to the specified format and arguments.

public void
warn(String
the message accompanying the exception
msg
,
Throwable
the exception (throwable) to log
t
)

Log an exception (throwable) at the WARN level with an accompanying message.

public default void
warnOrDebug(Logger.ChoiceOfMessageSupplier
the ChoiceOfMessageSupplier invoked in priority with true for the DEBUG level message, or false for WARN level
messageSupplier
)

Convenience method to log a message that is different according to the log level.

public default void
warnOrDebug(Logger.ChoiceOfMessageSupplier
the ChoiceOfMessageSupplier invoked in priority with true for the DEBUG level message, or false for WARN level
messageSupplier
,
Throwable
the Throwable the original exception to be logged
cause
)

Convenience method to log an exception (throwable), with an accompanying message that is different according to the log level.

Method Detail

debugback to summary
public void debug(String msg)

Log a message at the DEBUG level.

Parameters
msg:String

the message string to be logged

debugback to summary
public void debug(String format, Object... arguments)

Log a message at the DEBUG level according to the specified format and arguments.

This form avoids superfluous string concatenation when the logger is disabled for the DEBUG level. However, this variant incurs the hidden (and relatively small) cost of creating an Object[] before invoking the method, even if this logger is disabled for DEBUG.

Parameters
format:String

the format string

arguments:Object[]

a list of 3 or more arguments

debugback to summary
public void debug(String msg, Throwable t)

Log an exception (throwable) at the DEBUG level with an accompanying message.

Parameters
msg:String

the message accompanying the exception

t:Throwable

the exception (throwable) to log

errorback to summary
public void error(String msg)

Log a message at the ERROR level.

Parameters
msg:String

the message string to be logged

errorback to summary
public void error(String format, Object... arguments)

Log a message at the ERROR level according to the specified format and arguments.

This form avoids superfluous string concatenation when the logger is disabled for the ERROR level. However, this variant incurs the hidden (and relatively small) cost of creating an Object[] before invoking the method, even if this logger is disabled for ERROR.

Parameters
format:String

the format string

arguments:Object[]

a list of 3 or more arguments

errorback to summary
public void error(String msg, Throwable t)

Log an exception (throwable) at the ERROR level with an accompanying message.

Parameters
msg:String

the message accompanying the exception

t:Throwable

the exception (throwable) to log

errorOrDebugback to summary
public default void errorOrDebug(Logger.ChoiceOfMessageSupplier messageSupplier)

Convenience method to log a message that is different according to the log level. In priority, DEBUG level is used if isDebugEnabled(). Otherwise, ERROR level is used (unless isErrorEnabled() is false).

This can be used to log different level of details according to the active log level.

Parameters
messageSupplier:Logger.ChoiceOfMessageSupplier

the ChoiceOfMessageSupplier invoked in priority with true for the DEBUG level message, or false for ERROR level

See Also
error(String)
errorOrDebugback to summary
public default void errorOrDebug(Logger.ChoiceOfMessageSupplier messageSupplier, Throwable cause)

Convenience method to log an exception (throwable), with an accompanying message that is different according to the log level. In priority, DEBUG level is used if isDebugEnabled(). Otherwise, ERROR level is used (unless isErrorEnabled() is false).

This can be used to log different level of details according to the active log level.

Parameters
messageSupplier:Logger.ChoiceOfMessageSupplier

the ChoiceOfMessageSupplier invoked in priority with true for the DEBUG level message, or false for ERROR level

cause:Throwable

the Throwable the original exception to be logged

See Also
error(String, Throwable)
getNameback to summary
public String getName()

Return the name of this Logger instance.

Returns:String

name of this logger instance

infoback to summary
public void info(String msg)

Log a message at the INFO level.

Parameters
msg:String

the message string to be logged

infoback to summary
public void info(String format, Object... arguments)

Log a message at the INFO level according to the specified format and arguments.

This form avoids superfluous string concatenation when the logger is disabled for the INFO level. However, this variant incurs the hidden (and relatively small) cost of creating an Object[] before invoking the method, even if this logger is disabled for INFO.

Parameters
format:String

the format string

arguments:Object[]

a list of 3 or more arguments

infoback to summary
public void info(String msg, Throwable t)

Log an exception (throwable) at the INFO level with an accompanying message.

Parameters
msg:String

the message accompanying the exception

t:Throwable

the exception (throwable) to log

infoOrDebugback to summary
public default void infoOrDebug(Logger.ChoiceOfMessageSupplier messageSupplier)

Convenience method to log a message that is different according to the log level. In priority, DEBUG level is used if isDebugEnabled(). Otherwise, INFO level is used (unless isInfoEnabled() is false).

This can be used to log different level of details according to the active log level.

Parameters
messageSupplier:Logger.ChoiceOfMessageSupplier

the ChoiceOfMessageSupplier invoked in priority with true for the DEBUG level message, or false for INFO level

See Also
info(String)
infoOrDebugback to summary
public default void infoOrDebug(Logger.ChoiceOfMessageSupplier messageSupplier, Throwable cause)

Convenience method to log an exception (throwable), with an accompanying message that is different according to the log level. In priority, DEBUG level is used if isDebugEnabled(). Otherwise, INFO level is used (unless isInfoEnabled() is false).

This can be used to log different level of details according to the active log level.

Parameters
messageSupplier:Logger.ChoiceOfMessageSupplier

the ChoiceOfMessageSupplier invoked in priority with true for the DEBUG level message, or false for INFO level

cause:Throwable

the Throwable the original exception to be logged

See Also
info(String, Throwable)
isDebugEnabledback to summary
public boolean isDebugEnabled()

Is the logger instance enabled for the DEBUG level?

Returns:boolean

True if this Logger is enabled for the DEBUG level, false otherwise.

isErrorEnabledback to summary
public boolean isErrorEnabled()

Is the logger instance enabled for the ERROR level?

Returns:boolean

True if this Logger is enabled for the ERROR level, false otherwise.

isInfoEnabledback to summary
public boolean isInfoEnabled()

Is the logger instance enabled for the INFO level?

Returns:boolean

True if this Logger is enabled for the INFO level, false otherwise.

isTraceEnabledback to summary
public boolean isTraceEnabled()

Is the logger instance enabled for the TRACE level?

Returns:boolean

True if this Logger is enabled for the TRACE level, false otherwise.

isWarnEnabledback to summary
public boolean isWarnEnabled()

Is the logger instance enabled for the WARN level?

Returns:boolean

True if this Logger is enabled for the WARN level, false otherwise.

traceback to summary
public void trace(String msg)

Log a message at the TRACE level.

Parameters
msg:String

the message string to be logged

traceback to summary
public void trace(String format, Object... arguments)

Log a message at the TRACE level according to the specified format and arguments.

This form avoids superfluous string concatenation when the logger is disabled for the TRACE level. However, this variant incurs the hidden (and relatively small) cost of creating an Object[] before invoking the method, even if this logger is disabled for TRACE.

Parameters
format:String

the format string

arguments:Object[]

a list of 3 or more arguments

traceback to summary
public void trace(String msg, Throwable t)

Log an exception (throwable) at the TRACE level with an accompanying message.

Parameters
msg:String

the message accompanying the exception

t:Throwable

the exception (throwable) to log

warnback to summary
public void warn(String msg)

Log a message at the WARN level.

Parameters
msg:String

the message string to be logged

warnback to summary
public void warn(String format, Object... arguments)

Log a message at the WARN level according to the specified format and arguments.

This form avoids superfluous string concatenation when the logger is disabled for the WARN level. However, this variant incurs the hidden (and relatively small) cost of creating an Object[] before invoking the method, even if this logger is disabled for WARN.

Parameters
format:String

the format string

arguments:Object[]

a list of 3 or more arguments

warnback to summary
public void warn(String msg, Throwable t)

Log an exception (throwable) at the WARN level with an accompanying message.

Parameters
msg:String

the message accompanying the exception

t:Throwable

the exception (throwable) to log

warnOrDebugback to summary
public default void warnOrDebug(Logger.ChoiceOfMessageSupplier messageSupplier)

Convenience method to log a message that is different according to the log level. In priority, DEBUG level is used if isDebugEnabled(). Otherwise, WARN level is used (unless isWarnEnabled() is false).

This can be used to log different level of details according to the active log level.

Parameters
messageSupplier:Logger.ChoiceOfMessageSupplier

the ChoiceOfMessageSupplier invoked in priority with true for the DEBUG level message, or false for WARN level

See Also
warn(String)
warnOrDebugback to summary
public default void warnOrDebug(Logger.ChoiceOfMessageSupplier messageSupplier, Throwable cause)

Convenience method to log an exception (throwable), with an accompanying message that is different according to the log level. In priority, DEBUG level is used if isDebugEnabled(). Otherwise, WARN level is used (unless isWarnEnabled() is false).

This can be used to log different level of details according to the active log level.

Parameters
messageSupplier:Logger.ChoiceOfMessageSupplier

the ChoiceOfMessageSupplier invoked in priority with true for the DEBUG level message, or false for WARN level

cause:Throwable

the Throwable the original exception to be logged

See Also
warn(String, Throwable)
reactor.util back to summary

public Interface Logger.ChoiceOfMessageSupplier

Annotations
@FunctionalInterface

A kind of java.util.function.Predicate and Supplier mix, provides two variants of a message String depending on the level of detail desired.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the message String according to the passed level of detail
get
(boolean
true for higher level of detail, false for lower level of detail
isVerbose
)

Provide two possible versions of a message String, depending on the level of detail desired.

Method Detail

getback to summary
public String get(boolean isVerbose)

Provide two possible versions of a message String, depending on the level of detail desired.

Parameters
isVerbose:boolean

true for higher level of detail, false for lower level of detail

Returns:String

the message String according to the passed level of detail