Package org.datanucleus.util
Class JRELogger
java.lang.Object
org.datanucleus.util.NucleusLogger
org.datanucleus.util.JRELogger
JRE logger (java.util.logging) implementation of a NucleusLogger.
Assumes that all configuration of the loggers are done by external configuration (System property "java.util.logging.config.file").
Maps logging levels as follows :
- debug maps to java.util.logging fine
- info maps to java.util.logging info
- warn maps to java.util.logging warning
- error maps to java.util.logging severe
- fatal maps to java.util.logging severe
-
Field Summary
FieldsFields inherited from class org.datanucleus.util.NucleusLogger
CACHE, CONNECTION, DATASTORE, DATASTORE_NATIVE, DATASTORE_PERSIST, DATASTORE_RETRIEVE, DATASTORE_SCHEMA, GENERAL, METADATA, PERSISTENCE, QUERY, TRANSACTION, VALUEGENERATION
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Log a debug message.void
Log a debug message with throwable.void
Log an error message.void
Log an error message with throwable.void
Log a fatal message.void
Log a fatal message with throwable.Accessor for the native logger object.void
Log an info message.void
Log an info message with throwable.boolean
Accessor for whether debug logging is enabledboolean
Accessor for whether info logging is enabledprivate void
void
Log a warning message.void
Log a warning message with throwable.Methods inherited from class org.datanucleus.util.NucleusLogger
getLoggerInstance
-
Field Details
-
logger
The JRE Logger being used
-
-
Constructor Details
-
JRELogger
Constructor for a JRE Logger.- Parameters:
logName
- Name of the logger
-
-
Method Details
-
getNativeLogger
Description copied from class:NucleusLogger
Accessor for the native logger object.- Specified by:
getNativeLogger
in classNucleusLogger
- Returns:
- The native logger object
-
debug
Description copied from class:NucleusLogger
Log a debug message.- Specified by:
debug
in classNucleusLogger
- Parameters:
msg
- The message
-
debug
Description copied from class:NucleusLogger
Log a debug message with throwable.- Specified by:
debug
in classNucleusLogger
- Parameters:
msg
- The messagethr
- A throwable
-
info
Description copied from class:NucleusLogger
Log an info message.- Specified by:
info
in classNucleusLogger
- Parameters:
msg
- The message
-
info
Description copied from class:NucleusLogger
Log an info message with throwable.- Specified by:
info
in classNucleusLogger
- Parameters:
msg
- The messagethr
- A throwable
-
warn
Description copied from class:NucleusLogger
Log a warning message.- Specified by:
warn
in classNucleusLogger
- Parameters:
msg
- The message
-
warn
Description copied from class:NucleusLogger
Log a warning message with throwable.- Specified by:
warn
in classNucleusLogger
- Parameters:
msg
- The messagethr
- A throwable
-
error
Description copied from class:NucleusLogger
Log an error message.- Specified by:
error
in classNucleusLogger
- Parameters:
msg
- The message
-
error
Description copied from class:NucleusLogger
Log an error message with throwable.- Specified by:
error
in classNucleusLogger
- Parameters:
msg
- The messagethr
- A throwable
-
fatal
Description copied from class:NucleusLogger
Log a fatal message.- Specified by:
fatal
in classNucleusLogger
- Parameters:
msg
- The message
-
fatal
Description copied from class:NucleusLogger
Log a fatal message with throwable.- Specified by:
fatal
in classNucleusLogger
- Parameters:
msg
- The messagethr
- A throwable
-
isDebugEnabled
public boolean isDebugEnabled()Description copied from class:NucleusLogger
Accessor for whether debug logging is enabled- Specified by:
isDebugEnabled
in classNucleusLogger
- Returns:
- Whether it is enabled
-
isInfoEnabled
public boolean isInfoEnabled()Description copied from class:NucleusLogger
Accessor for whether info logging is enabled- Specified by:
isInfoEnabled
in classNucleusLogger
- Returns:
- Whether it is enabled
-
log
-