- java.lang.Object
-
- org.datanucleus.util.NucleusLogger
-
- org.datanucleus.util.JDK14Logger
-
public class JDK14Logger extends NucleusLogger
JDK1.4 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
-
Fields inherited from class org.datanucleus.util.NucleusLogger
CACHE, CONNECTION, DATASTORE, DATASTORE_NATIVE, DATASTORE_PERSIST, DATASTORE_RETRIEVE, DATASTORE_SCHEMA, GENERAL, LIFECYCLE, METADATA, PERSISTENCE, QUERY, TRANSACTION, VALUEGENERATION
-
-
Constructor Summary
Constructors Constructor Description JDK14Logger(String logName)
Constructor for a JDK 1.4 Logger.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
debug(Object msg)
Log a debug message.void
debug(Object msg, Throwable thr)
Log a debug message with throwable.void
error(Object msg)
Log an error message.void
error(Object msg, Throwable thr)
Log an error message with throwable.void
fatal(Object msg)
Log a fatal message.void
fatal(Object msg, Throwable thr)
Log a fatal message with throwable.Object
getNativeLogger()
Accessor for the native logger object.void
info(Object msg)
Log an info message.void
info(Object msg, Throwable thr)
Log an info message with throwable.boolean
isDebugEnabled()
Accessor for whether debug logging is enabledboolean
isInfoEnabled()
Accessor for whether info logging is enabledvoid
warn(Object msg)
Log a warning message.void
warn(Object msg, Throwable thr)
Log a warning message with throwable.-
Methods inherited from class org.datanucleus.util.NucleusLogger
getLoggerInstance
-
-
-
-
Constructor Detail
-
JDK14Logger
public JDK14Logger(String logName)
Constructor for a JDK 1.4 Logger.- Parameters:
logName
- Name of the logger
-
-
Method Detail
-
getNativeLogger
public Object getNativeLogger()
Description copied from class:NucleusLogger
Accessor for the native logger object.- Specified by:
getNativeLogger
in classNucleusLogger
- Returns:
- The native logger object
-
debug
public void debug(Object msg)
Log a debug message.- Specified by:
debug
in classNucleusLogger
- Parameters:
msg
- The message
-
debug
public void debug(Object msg, Throwable thr)
Log a debug message with throwable.- Specified by:
debug
in classNucleusLogger
- Parameters:
msg
- The messagethr
- A throwable
-
info
public void info(Object msg)
Log an info message.- Specified by:
info
in classNucleusLogger
- Parameters:
msg
- The message
-
info
public void info(Object msg, Throwable thr)
Log an info message with throwable.- Specified by:
info
in classNucleusLogger
- Parameters:
msg
- The messagethr
- A throwable
-
warn
public void warn(Object msg)
Log a warning message.- Specified by:
warn
in classNucleusLogger
- Parameters:
msg
- The message
-
warn
public void warn(Object msg, Throwable thr)
Log a warning message with throwable.- Specified by:
warn
in classNucleusLogger
- Parameters:
msg
- The messagethr
- A throwable
-
error
public void error(Object msg)
Log an error message.- Specified by:
error
in classNucleusLogger
- Parameters:
msg
- The message
-
error
public void error(Object msg, Throwable thr)
Log an error message with throwable.- Specified by:
error
in classNucleusLogger
- Parameters:
msg
- The messagethr
- A throwable
-
fatal
public void fatal(Object msg)
Log a fatal message.- Specified by:
fatal
in classNucleusLogger
- Parameters:
msg
- The message
-
fatal
public void fatal(Object msg, Throwable thr)
Log a fatal message with throwable.- Specified by:
fatal
in classNucleusLogger
- Parameters:
msg
- The messagethr
- A throwable
-
isDebugEnabled
public boolean isDebugEnabled()
Accessor for whether debug logging is enabled- Specified by:
isDebugEnabled
in classNucleusLogger
- Returns:
- Whether it is enabled
-
isInfoEnabled
public boolean isInfoEnabled()
Accessor for whether info logging is enabled- Specified by:
isInfoEnabled
in classNucleusLogger
- Returns:
- Whether it is enabled
-
-