org.datanucleus.util
Class NucleusLogger

java.lang.Object
  extended by org.datanucleus.util.NucleusLogger
Direct Known Subclasses:
JDK14Logger, Log4JLogger, NullLogger

public abstract class NucleusLogger
extends java.lang.Object

Logging framework for DataNucleus. Allows use of Log4J, JDK1.4, or no logging. Performs a similar role to Apache CommonsLogging yet doesn't need an extra jar to be present in the CLASSPATH and also allows for no available logger.


Field Summary
static NucleusLogger CACHE
          Log for Cache issues
static NucleusLogger CLASSLOADING
          Log for ClassLoading issues
static NucleusLogger CONNECTION
          Log for Connection issues
static NucleusLogger DATASTORE
          Log for Datastore issues
static NucleusLogger DATASTORE_PERSIST
          Log for Datastore persistence issues
static NucleusLogger DATASTORE_RETRIEVE
          Log for Datastore retrieval issues
static NucleusLogger DATASTORE_SCHEMA
          Log for Datastore Schema issues
static NucleusLogger GENERAL
          Log for General issues
static NucleusLogger JCA
          Log for JCA issues
static NucleusLogger JDO
          Log for JDO issues
static NucleusLogger JPA
          Log for JPA issues
static NucleusLogger LIFECYCLE
          Log for Lifecycle issues
static NucleusLogger MANAGEMENT
          Log for MANAGEMENT issues
static NucleusLogger METADATA
          Log for METADATA issues
static NucleusLogger NAMING
          Log for javax.naming issues
static NucleusLogger PERSISTENCE
          Log for Persistence issues
static NucleusLogger PLUGIN
          Log for PLUGIN issues
static NucleusLogger QUERY
          Log for Query issues
static NucleusLogger REACHABILITY
          Log for REACHABILITY issues
static NucleusLogger SCHEMATOOL
          Log for SchemaTool
static NucleusLogger TRANSACTION
          Log for Transaction issues
static NucleusLogger VALUEGENERATION
          Log for value generation issues
 
Constructor Summary
NucleusLogger()
           
 
Method Summary
abstract  void debug(java.lang.Object msg)
          Log a debug message.
abstract  void debug(java.lang.Object msg, java.lang.Throwable thr)
          Log a debug message with throwable.
abstract  void error(java.lang.Object msg)
          Log an error message.
abstract  void error(java.lang.Object msg, java.lang.Throwable thr)
          Log an error message with throwable.
abstract  void fatal(java.lang.Object msg)
          Log a fatal message.
abstract  void fatal(java.lang.Object msg, java.lang.Throwable thr)
          Log a fatal message with throwable.
static NucleusLogger getLoggerInstance(java.lang.String logCategory)
          Method to create a logger instance.
abstract  void info(java.lang.Object msg)
          Log an info message.
abstract  void info(java.lang.Object msg, java.lang.Throwable thr)
          Log an info message with throwable.
abstract  boolean isDebugEnabled()
          Accessor for whether debug logging is enabled
abstract  boolean isInfoEnabled()
          Accessor for whether info logging is enabled
abstract  void warn(java.lang.Object msg)
          Log a warning message.
abstract  void warn(java.lang.Object msg, java.lang.Throwable thr)
          Log a warning message with throwable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JDO

public static final NucleusLogger JDO
Log for JDO issues


JPA

public static final NucleusLogger JPA
Log for JPA issues


PERSISTENCE

public static final NucleusLogger PERSISTENCE
Log for Persistence issues


LIFECYCLE

public static final NucleusLogger LIFECYCLE
Log for Lifecycle issues


QUERY

public static final NucleusLogger QUERY
Log for Query issues


REACHABILITY

public static final NucleusLogger REACHABILITY
Log for REACHABILITY issues


METADATA

public static final NucleusLogger METADATA
Log for METADATA issues


MANAGEMENT

public static final NucleusLogger MANAGEMENT
Log for MANAGEMENT issues


CACHE

public static final NucleusLogger CACHE
Log for Cache issues


GENERAL

public static final NucleusLogger GENERAL
Log for General issues


TRANSACTION

public static final NucleusLogger TRANSACTION
Log for Transaction issues


CONNECTION

public static final NucleusLogger CONNECTION
Log for Connection issues


JCA

public static final NucleusLogger JCA
Log for JCA issues


CLASSLOADING

public static final NucleusLogger CLASSLOADING
Log for ClassLoading issues


PLUGIN

public static final NucleusLogger PLUGIN
Log for PLUGIN issues


VALUEGENERATION

public static final NucleusLogger VALUEGENERATION
Log for value generation issues


NAMING

public static final NucleusLogger NAMING
Log for javax.naming issues


DATASTORE

public static final NucleusLogger DATASTORE
Log for Datastore issues


DATASTORE_PERSIST

public static final NucleusLogger DATASTORE_PERSIST
Log for Datastore persistence issues


DATASTORE_RETRIEVE

public static final NucleusLogger DATASTORE_RETRIEVE
Log for Datastore retrieval issues


DATASTORE_SCHEMA

public static final NucleusLogger DATASTORE_SCHEMA
Log for Datastore Schema issues


SCHEMATOOL

public static final NucleusLogger SCHEMATOOL
Log for SchemaTool

Constructor Detail

NucleusLogger

public NucleusLogger()
Method Detail

getLoggerInstance

public static NucleusLogger getLoggerInstance(java.lang.String logCategory)
Method to create a logger instance.

Parameters:
logCategory - The category (or null)
Returns:
The logger

debug

public abstract void debug(java.lang.Object msg)
Log a debug message.

Parameters:
msg - The message

debug

public abstract void debug(java.lang.Object msg,
                           java.lang.Throwable thr)
Log a debug message with throwable.

Parameters:
msg - The message
thr - A throwable

info

public abstract void info(java.lang.Object msg)
Log an info message.

Parameters:
msg - The message

info

public abstract void info(java.lang.Object msg,
                          java.lang.Throwable thr)
Log an info message with throwable.

Parameters:
msg - The message
thr - A throwable

warn

public abstract void warn(java.lang.Object msg)
Log a warning message.

Parameters:
msg - The message

warn

public abstract void warn(java.lang.Object msg,
                          java.lang.Throwable thr)
Log a warning message with throwable.

Parameters:
msg - The message
thr - A throwable

error

public abstract void error(java.lang.Object msg)
Log an error message.

Parameters:
msg - The message

error

public abstract void error(java.lang.Object msg,
                           java.lang.Throwable thr)
Log an error message with throwable.

Parameters:
msg - The message
thr - A throwable

fatal

public abstract void fatal(java.lang.Object msg)
Log a fatal message.

Parameters:
msg - The message

fatal

public abstract void fatal(java.lang.Object msg,
                           java.lang.Throwable thr)
Log a fatal message with throwable.

Parameters:
msg - The message
thr - A throwable

isDebugEnabled

public abstract boolean isDebugEnabled()
Accessor for whether debug logging is enabled

Returns:
Whether it is enabled

isInfoEnabled

public abstract boolean isInfoEnabled()
Accessor for whether info logging is enabled

Returns:
Whether it is enabled


Copyright © 2009. All Rights Reserved.