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
FieldsModifier and TypeFieldDescriptionstatic final intSeverity 0 will always be logged.static final intSeverity 4 indicates configuration related log message.static final intSeverity 1 indicates an error.static final intSeverity 5 indicates an essential debug message.static final intSeverity 6 indicates a non-essential debug message.static final intSeverity 7 indicates a very low-level, non-essential debug message or a tracing message.static final intSeverity 3 indicates information that should likely be logged.static final intSeverity 2 indicates a warning. - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic voidLog the specified message withCONFIGseverity.static voidLog the specified message and the exception stack trace withCONFIGseverity.static voidLog the specified exception information (message and stack trace) withCONFIGseverity.static voidLog the specified message withCONFIGseverity.static voidLog the specified message and the exception stack trace withCONFIGseverity.static voidEntry logging.static voidLog the specified message withERRORseverity.static voidLog the specified message and the exception stack trace withERRORseverity.static voidLog the specified exception information (message and stack trace) withERRORseverity.static voidLog the specified message withERRORseverity.static voidLog the specified message and the exception stack trace withERRORseverity.static voidExit logging.static voidExit logging.static voidLog the specified message withFINEseverity.static voidLog the specified message and the exception stack trace withFINEseverity.static voidLog the specified exception information (message and stack trace) withFINEseverity.static voidLog the specified message withFINEseverity.static voidLog the specified message and the exception stack trace withFINEseverity.static voidLog the specified message withFINERseverity.static voidLog the specified message and the exception stack trace withFINERseverity.static voidLog the specified exception information (message and stack trace) withFINERseverity.static voidLog the specified message withFINERseverity.static voidLog the specified message and the exception stack trace withFINERseverity.static voidLog the specified message withFINESTseverity.static voidLog the specified message and the exception stack trace withFINESTseverity.static voidLog the specified exception information (message and stack trace) withFINESTseverity.static voidLog the specified message withFINESTseverity.static voidLog the specified message and the exception stack trace withFINESTseverity.static voidLog the specified message withINFOseverity.static voidLog the specified message and the exception stack trace withINFOseverity.static voidLog the specified exception information (message and stack trace) withINFOseverity.static voidLog the specified message withINFOseverity.static voidLog the specified message and the exception stack trace withINFOseverity.static booleanisEnabled(int nSeverity) Returntrueif the specified severity level should be logged.static voidLog the specified message at the specified severity level.static voidLog the specified message and the exception stack trace at the specified severity level.static voidLog the specified exception information (message and stack trace) at the specified severity level.static voidLog the specified message at the specified severity level.static voidLog the specified message and the exception stack trace at the specified severity level.static voidLog the specified message withALWAYSseverity.static voidLog the specified message and the exception stack trace withALWAYSseverity.static voidLog the specified exception information (message and stack trace) withALWAYSseverity.static voidLog the specified message withALWAYSseverity.static voidLog the specified message and the exception stack trace withALWAYSseverity.static voidsetLoggingLevel(int nSeverity) Set the logging level.static voidThrowable logging.static voidLog the specified message withWARNINGseverity.static voidLog the specified message and the exception stack trace withWARNINGseverity.static voidLog the specified exception information (message and stack trace) withWARNINGseverity.static voidLog the specified message withWARNINGseverity.static voidLog the specified message and the exception stack trace withWARNINGseverity. 
- 
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) Returntrueif the specified severity level should be logged.- Parameters:
 nSeverity- the severity level- Returns:
 trueif the specified severity level should be logged;falseotherwise
 - 
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 withALWAYSseverity.- Parameters:
 sMessage- the message to log
 - 
out
Log the specified message withALWAYSseverity. 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 withALWAYSseverity.- Parameters:
 sMessage- the message to loge- the exception to log the stack trace for
 - 
out
Log the specified message and the exception stack trace withALWAYSseverity. 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) withALWAYSseverity.- Parameters:
 e- the exception to log
 - 
err
Log the specified message withERRORseverity.- Parameters:
 sMessage- the message to log
 - 
err
Log the specified message withERRORseverity. 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 withERRORseverity.- Parameters:
 sMessage- the message to loge- the exception to log the stack trace for
 - 
err
Log the specified message and the exception stack trace withERRORseverity. 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) withERRORseverity.- Parameters:
 e- the exception to log
 - 
warn
Log the specified message withWARNINGseverity.- Parameters:
 sMessage- the message to log
 - 
warn
Log the specified message withWARNINGseverity. 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 withWARNINGseverity.- Parameters:
 sMessage- the message to loge- the exception to log the stack trace for
 - 
warn
Log the specified message and the exception stack trace withWARNINGseverity. 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) withWARNINGseverity.- Parameters:
 e- the exception to log
 - 
info
Log the specified message withINFOseverity.- Parameters:
 sMessage- the message to log
 - 
info
Log the specified message withINFOseverity. 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 withINFOseverity.- Parameters:
 sMessage- the message to loge- the exception to log the stack trace for
 - 
info
Log the specified message and the exception stack trace withINFOseverity. 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) withINFOseverity.- Parameters:
 e- the exception to log
 - 
config
Log the specified message withCONFIGseverity.- Parameters:
 sMessage- the message to log
 - 
config
Log the specified message withCONFIGseverity. 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 withCONFIGseverity.- Parameters:
 sMessage- the message to loge- the exception to log the stack trace for
 - 
config
Log the specified message and the exception stack trace withCONFIGseverity. 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) withCONFIGseverity.- Parameters:
 e- the exception to log
 - 
fine
Log the specified message withFINEseverity.- Parameters:
 sMessage- the message to log
 - 
fine
Log the specified message withFINEseverity. 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 withFINEseverity.- Parameters:
 sMessage- the message to loge- the exception to log the stack trace for
 - 
fine
Log the specified message and the exception stack trace withFINEseverity. 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) withFINEseverity.- Parameters:
 e- the exception to log
 - 
finer
Log the specified message withFINERseverity.- Parameters:
 sMessage- the message to log
 - 
finer
Log the specified message withFINERseverity. 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 withFINERseverity.- Parameters:
 sMessage- the message to loge- the exception to log the stack trace for
 - 
finer
Log the specified message and the exception stack trace withFINERseverity. 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) withFINERseverity.- Parameters:
 e- the exception to log
 - 
finest
Log the specified message withFINESTseverity.- Parameters:
 sMessage- the message to log
 - 
finest
Log the specified message withFINESTseverity. 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 withFINESTseverity.- Parameters:
 sMessage- the message to loge- the exception to log the stack trace for
 - 
finest
Log the specified message and the exception stack trace withFINESTseverity. 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) withFINESTseverity.- Parameters:
 e- the exception to log
 - 
entering
Entry logging.- Parameters:
 clz- the sourceClasssMethod- the source methodparams- zero or more parameters to log- Throws:
 NullPointerException- if eitherclzorsMethodarenull- Since:
 - 22.06
 
 - 
exiting
Exit logging.- Parameters:
 clz- the sourceClasssMethod- the source method- Throws:
 NullPointerException- if eitherclzorsMethodarenull- Since:
 - 22.06
 
 - 
exiting
Exit logging.- Parameters:
 clz- the sourceClasssMethod- the source methodresult- the result returned by the exiting methodadditionalInfo- zero or more additional state details at the time of exit- Throws:
 NullPointerException- if eitherclzorsMethodarenull- Since:
 - 22.06
 
 - 
throwing
public static void throwing(Class<?> clz, String sMethod, Throwable throwable, Object... additionalInfo) Throwable logging.- Parameters:
 clz- the sourceClasssMethod- the source methodthrowable- theExceptionbeing 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
 
 
 -