Package com.oracle.coherence.common.base
Class Logger
java.lang.Object
com.oracle.coherence.common.base.Logger
Logging API.
- Since:
- 20.06
- Author:
- Aleks Seovic 2020.05.18
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Severity 0 will always be logged.static final int
Severity 4 indicates configuration related log message.static final int
Severity 1 indicates an error.static final int
Severity 5 indicates an essential debug message.static final int
Severity 6 indicates a non-essential debug message.static final int
Severity 7 indicates a very low-level, non-essential debug message or a tracing message.static final int
Severity 3 indicates information that should likely be logged.static final int
Severity 2 indicates a warning. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Log the specified message withCONFIG
severity.static void
Log the specified message and the exception stack trace withCONFIG
severity.static void
Log the specified exception information (message and stack trace) withCONFIG
severity.static void
Log the specified message withCONFIG
severity.static void
Log the specified message and the exception stack trace withCONFIG
severity.static void
Entry logging.static void
Log the specified message withERROR
severity.static void
Log the specified message and the exception stack trace withERROR
severity.static void
Log the specified exception information (message and stack trace) withERROR
severity.static void
Log the specified message withERROR
severity.static void
Log the specified message and the exception stack trace withERROR
severity.static void
Exit logging.static void
Exit logging.static void
Log the specified message withFINE
severity.static void
Log the specified message and the exception stack trace withFINE
severity.static void
Log the specified exception information (message and stack trace) withFINE
severity.static void
Log the specified message withFINE
severity.static void
Log the specified message and the exception stack trace withFINE
severity.static void
Log the specified message withFINER
severity.static void
Log the specified message and the exception stack trace withFINER
severity.static void
Log the specified exception information (message and stack trace) withFINER
severity.static void
Log the specified message withFINER
severity.static void
Log the specified message and the exception stack trace withFINER
severity.static void
Log the specified message withFINEST
severity.static void
Log the specified message and the exception stack trace withFINEST
severity.static void
Log the specified exception information (message and stack trace) withFINEST
severity.static void
Log the specified message withFINEST
severity.static void
Log the specified message and the exception stack trace withFINEST
severity.static void
Log the specified message withINFO
severity.static void
Log the specified message and the exception stack trace withINFO
severity.static void
Log the specified exception information (message and stack trace) withINFO
severity.static void
Log the specified message withINFO
severity.static void
Log the specified message and the exception stack trace withINFO
severity.static boolean
isEnabled
(int nSeverity) Returntrue
if the specified severity level should be logged.static void
Log the specified message at the specified severity level.static void
Log the specified message and the exception stack trace at the specified severity level.static void
Log the specified exception information (message and stack trace) at the specified severity level.static void
Log the specified message at the specified severity level.static void
Log the specified message and the exception stack trace at the specified severity level.static void
Log the specified message withALWAYS
severity.static void
Log the specified message and the exception stack trace withALWAYS
severity.static void
Log the specified exception information (message and stack trace) withALWAYS
severity.static void
Log the specified message withALWAYS
severity.static void
Log the specified message and the exception stack trace withALWAYS
severity.static void
setLoggingLevel
(int nSeverity) Set the logging level.static void
Throwable logging.static void
Log the specified message withWARNING
severity.static void
Log the specified message and the exception stack trace withWARNING
severity.static void
Log the specified exception information (message and stack trace) withWARNING
severity.static void
Log the specified message withWARNING
severity.static void
Log the specified message and the exception stack trace withWARNING
severity.
-
Field Details
-
ALWAYS
public static final int ALWAYSSeverity 0 will always be logged.- See Also:
-
ERROR
public static final int ERRORSeverity 1 indicates an error.- See Also:
-
WARNING
public static final int WARNINGSeverity 2 indicates a warning.- See Also:
-
INFO
public static final int INFOSeverity 3 indicates information that should likely be logged.- See Also:
-
CONFIG
public static final int CONFIGSeverity 4 indicates configuration related log message.- See Also:
-
FINE
public static final int FINESeverity 5 indicates an essential debug message.- See Also:
-
FINER
public static final int FINERSeverity 6 indicates a non-essential debug message.- See Also:
-
FINEST
public static final int FINESTSeverity 7 indicates a very low-level, non-essential debug message or a tracing message.- See Also:
-
-
Constructor Details
-
Logger
public Logger()
-
-
Method Details
-
isEnabled
public static boolean isEnabled(int nSeverity) Returntrue
if the specified severity level should be logged.- Parameters:
nSeverity
- the severity level- Returns:
true
if the specified severity level should be logged;false
otherwise
-
log
Log the specified message at the specified severity level.- Parameters:
sMessage
- the message to lognSeverity
- the severity level
-
log
Log the specified message at the specified severity level. The message is provided by theSupplier
, which will only be evaluated if the messages should be logged at the specified severity level. This avoids potentially expensive message construction if the message isn't going to be logged.- Parameters:
supplierMessage
- the supplier of the message to log; only evaluated if the specified severity level should be loggednSeverity
- the severity level
-
log
Log the specified message and the exception stack trace at the specified severity level.- Parameters:
sMessage
- the message to loge
- the exception to log the stack trace fornSeverity
- the severity level
-
log
Log the specified message and the exception stack trace at the specified severity level. The message is provided by theSupplier
, which will only be evaluated if the messages should be logged at the specified severity level. This avoids potentially expensive message construction if the message isn't going to be logged.- Parameters:
supplierMessage
- the supplier of the message to log; only evaluated if the specified severity level should be loggede
- the exception to log the stack trace fornSeverity
- the severity level
-
log
Log the specified exception information (message and stack trace) at the specified severity level.- Parameters:
e
- the exception to lognSeverity
- the severity level
-
out
Log the specified message withALWAYS
severity.- Parameters:
sMessage
- the message to log
-
out
Log the specified message withALWAYS
severity. The message is provided by theSupplier
, which will only be evaluated if the messages should be logged at the specified severity level. This avoids potentially expensive message construction if the message isn't going to be logged.- Parameters:
supplierMessage
- the supplier of the message to log; only evaluated if the specified severity level should be logged
-
out
Log the specified message and the exception stack trace withALWAYS
severity.- Parameters:
sMessage
- the message to loge
- the exception to log the stack trace for
-
out
Log the specified message and the exception stack trace withALWAYS
severity. The message is provided by theSupplier
, which will only be evaluated if the messages should be logged at the specified severity level. This avoids potentially expensive message construction if the message isn't going to be logged.- Parameters:
supplierMessage
- the supplier of the message to log; only evaluated if the specified severity level should be loggede
- the exception to log the stack trace for
-
out
Log the specified exception information (message and stack trace) withALWAYS
severity.- Parameters:
e
- the exception to log
-
err
Log the specified message withERROR
severity.- Parameters:
sMessage
- the message to log
-
err
Log the specified message withERROR
severity. The message is provided by theSupplier
, which will only be evaluated if the messages should be logged at the specified severity level. This avoids potentially expensive message construction if the message isn't going to be logged.- Parameters:
supplierMessage
- the supplier of the message to log; only evaluated if the specified severity level should be logged
-
err
Log the specified message and the exception stack trace withERROR
severity.- Parameters:
sMessage
- the message to loge
- the exception to log the stack trace for
-
err
Log the specified message and the exception stack trace withERROR
severity. The message is provided by theSupplier
, which will only be evaluated if the messages should be logged at the specified severity level. This avoids potentially expensive message construction if the message isn't going to be logged.- Parameters:
supplierMessage
- the supplier of the message to log; only evaluated if the specified severity level should be loggede
- the exception to log the stack trace for
-
err
Log the specified exception information (message and stack trace) withERROR
severity.- Parameters:
e
- the exception to log
-
warn
Log the specified message withWARNING
severity.- Parameters:
sMessage
- the message to log
-
warn
Log the specified message withWARNING
severity. The message is provided by theSupplier
, which will only be evaluated if the messages should be logged at the specified severity level. This avoids potentially expensive message construction if the message isn't going to be logged.- Parameters:
supplierMessage
- the supplier of the message to log; only evaluated if the specified severity level should be logged
-
warn
Log the specified message and the exception stack trace withWARNING
severity.- Parameters:
sMessage
- the message to loge
- the exception to log the stack trace for
-
warn
Log the specified message and the exception stack trace withWARNING
severity. The message is provided by theSupplier
, which will only be evaluated if the messages should be logged at the specified severity level. This avoids potentially expensive message construction if the message isn't going to be logged.- Parameters:
supplierMessage
- the supplier of the message to log; only evaluated if the specified severity level should be loggede
- the exception to log the stack trace for
-
warn
Log the specified exception information (message and stack trace) withWARNING
severity.- Parameters:
e
- the exception to log
-
info
Log the specified message withINFO
severity.- Parameters:
sMessage
- the message to log
-
info
Log the specified message withINFO
severity. The message is provided by theSupplier
, which will only be evaluated if the messages should be logged at the specified severity level. This avoids potentially expensive message construction if the message isn't going to be logged.- Parameters:
supplierMessage
- the supplier of the message to log; only evaluated if the specified severity level should be logged
-
info
Log the specified message and the exception stack trace withINFO
severity.- Parameters:
sMessage
- the message to loge
- the exception to log the stack trace for
-
info
Log the specified message and the exception stack trace withINFO
severity. The message is provided by theSupplier
, which will only be evaluated if the messages should be logged at the specified severity level. This avoids potentially expensive message construction if the message isn't going to be logged.- Parameters:
supplierMessage
- the supplier of the message to log; only evaluated if the specified severity level should be loggede
- the exception to log the stack trace for
-
info
Log the specified exception information (message and stack trace) withINFO
severity.- Parameters:
e
- the exception to log
-
config
Log the specified message withCONFIG
severity.- Parameters:
sMessage
- the message to log
-
config
Log the specified message withCONFIG
severity. The message is provided by theSupplier
, which will only be evaluated if the messages should be logged at the specified severity level. This avoids potentially expensive message construction if the message isn't going to be logged.- Parameters:
supplierMessage
- the supplier of the message to log; only evaluated if the specified severity level should be logged
-
config
Log the specified message and the exception stack trace withCONFIG
severity.- Parameters:
sMessage
- the message to loge
- the exception to log the stack trace for
-
config
Log the specified message and the exception stack trace withCONFIG
severity. The message is provided by theSupplier
, which will only be evaluated if the messages should be logged at the specified severity level. This avoids potentially expensive message construction if the message isn't going to be logged.- Parameters:
supplierMessage
- the supplier of the message to log; only evaluated if the specified severity level should be loggede
- the exception to log the stack trace for
-
config
Log the specified exception information (message and stack trace) withCONFIG
severity.- Parameters:
e
- the exception to log
-
fine
Log the specified message withFINE
severity.- Parameters:
sMessage
- the message to log
-
fine
Log the specified message withFINE
severity. The message is provided by theSupplier
, which will only be evaluated if the messages should be logged at the specified severity level. This avoids potentially expensive message construction if the message isn't going to be logged.- Parameters:
supplierMessage
- the supplier of the message to log; only evaluated if the specified severity level should be logged
-
fine
Log the specified message and the exception stack trace withFINE
severity.- Parameters:
sMessage
- the message to loge
- the exception to log the stack trace for
-
fine
Log the specified message and the exception stack trace withFINE
severity. The message is provided by theSupplier
, which will only be evaluated if the messages should be logged at the specified severity level. This avoids potentially expensive message construction if the message isn't going to be logged.- Parameters:
supplierMessage
- the supplier of the message to log; only evaluated if the specified severity level should be loggede
- the exception to log the stack trace for
-
fine
Log the specified exception information (message and stack trace) withFINE
severity.- Parameters:
e
- the exception to log
-
finer
Log the specified message withFINER
severity.- Parameters:
sMessage
- the message to log
-
finer
Log the specified message withFINER
severity. The message is provided by theSupplier
, which will only be evaluated if the messages should be logged at the specified severity level. This avoids potentially expensive message construction if the message isn't going to be logged.- Parameters:
supplierMessage
- the supplier of the message to log; only evaluated if the specified severity level should be logged
-
finer
Log the specified message and the exception stack trace withFINER
severity.- Parameters:
sMessage
- the message to loge
- the exception to log the stack trace for
-
finer
Log the specified message and the exception stack trace withFINER
severity. The message is provided by theSupplier
, which will only be evaluated if the messages should be logged at the specified severity level. This avoids potentially expensive message construction if the message isn't going to be logged.- Parameters:
supplierMessage
- the supplier of the message to log; only evaluated if the specified severity level should be loggede
- the exception to log the stack trace for
-
finer
Log the specified exception information (message and stack trace) withFINER
severity.- Parameters:
e
- the exception to log
-
finest
Log the specified message withFINEST
severity.- Parameters:
sMessage
- the message to log
-
finest
Log the specified message withFINEST
severity. The message is provided by theSupplier
, which will only be evaluated if the messages should be logged at the specified severity level. This avoids potentially expensive message construction if the message isn't going to be logged.- Parameters:
supplierMessage
- the supplier of the message to log; only evaluated if the specified severity level should be logged
-
finest
Log the specified message and the exception stack trace withFINEST
severity.- Parameters:
sMessage
- the message to loge
- the exception to log the stack trace for
-
finest
Log the specified message and the exception stack trace withFINEST
severity. The message is provided by theSupplier
, which will only be evaluated if the messages should be logged at the specified severity level. This avoids potentially expensive message construction if the message isn't going to be logged.- Parameters:
supplierMessage
- the supplier of the message to log; only evaluated if the specified severity level should be loggede
- the exception to log the stack trace for
-
finest
Log the specified exception information (message and stack trace) withFINEST
severity.- Parameters:
e
- the exception to log
-
entering
Entry logging.- Parameters:
clz
- the sourceClass
sMethod
- the source methodparams
- zero or more parameters to log- Throws:
NullPointerException
- if eitherclz
orsMethod
arenull
- Since:
- 22.06
-
exiting
Exit logging.- Parameters:
clz
- the sourceClass
sMethod
- the source method- Throws:
NullPointerException
- if eitherclz
orsMethod
arenull
- Since:
- 22.06
-
exiting
Exit logging.- Parameters:
clz
- the sourceClass
sMethod
- the source methodresult
- the result returned by the exiting methodadditionalInfo
- zero or more additional state details at the time of exit- Throws:
NullPointerException
- if eitherclz
orsMethod
arenull
- Since:
- 22.06
-
throwing
public static void throwing(Class<?> clz, String sMethod, Throwable throwable, Object... additionalInfo) Throwable logging.- Parameters:
clz
- the sourceClass
sMethod
- the source methodthrowable
- theException
being thrownadditionalInfo
- zero or more additional state details at the time of exit- Throws:
NullPointerException
- if any arguments arenull
- Since:
- 22.06
-
setLoggingLevel
public static void setLoggingLevel(int nSeverity) Set the logging level.- Parameters:
nSeverity
- the severity level- Since:
- 22.09
-