atg.nucleus.logging
Class VariableArgumentApplicationLoggingImpl

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
All Implemented Interfaces:
ApplicationLogging, VariableArgumentApplicationLogging
Direct Known Subclasses:
ApplicationLoggingImpl, GenericService, atg.nucleus.logging.LoggingFormatter, atg.nucleus.logging.LoggingSupport

public abstract class VariableArgumentApplicationLoggingImpl
extends java.lang.Object
implements VariableArgumentApplicationLogging

An implementation of the methods added by VariableArgumentApplicationLogging. Note that this implementation does not include the methods defined by ApplicationLogging, and is designed to be used as a base class for ApplicationLogging implementations that wish to add VariableArgumentApplicationLogging.. All methods use MessageFormat style argument strings. The MessageFormat interpretation used by this class has been extended to understand DynamicBeans property syntax DynamicBeans. The syntax supported is that handled by DynamicBeans.getSubPropertyValue(java.lang.Object, java.lang.String). For example, "{0.absoluteName}" or "{0.addresses[0].city}".

Created: August 21 2008


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
VariableArgumentApplicationLoggingImpl()
           
 
Method Summary
protected abstract  ApplicationLogging getLoggingForVlogging()
          Return the application logging to use for variable argument logging.
 boolean isLoggingTrace()
          Provide a default implementation for isLoggingTrace().
 void vlogDebug(java.util.ResourceBundle pBundle, java.lang.String pKey, java.lang.Object... pArgs)
          Log a resource-based log debug message.
 void vlogDebug(java.lang.String pFormat, java.lang.Object... pArgs)
          Log a formatted debug message.
 void vlogDebug(java.lang.Throwable pThrowable, java.util.ResourceBundle pBundle, java.lang.String pKey, java.lang.Object... pArgs)
          Log a resource-based log debug message.
 void vlogDebug(java.lang.Throwable pThrowable, java.lang.String pFormat, java.lang.Object... pArgs)
          Log a formatted debug message.
 void vlogDebugTrace(java.lang.String pFormat, java.lang.Object... pArgs)
          Log a formatted trace message if debug and trace logging are both enabled.
 void vlogError(java.util.ResourceBundle pBundle, java.lang.String pKey, java.lang.Object... pArgs)
          Log a resource-based log error message.
 void vlogError(java.lang.String pFormat, java.lang.Object... pArgs)
          Log a formatted error message.
 void vlogError(java.lang.Throwable pThrowable, java.util.ResourceBundle pBundle, java.lang.String pKey, java.lang.Object... pArgs)
          Log a resource-based log error message.
 void vlogError(java.lang.Throwable pThrowable, java.lang.String pFormat, java.lang.Object... pArgs)
          Log a formatted error message.
 void vlogInfo(java.util.ResourceBundle pBundle, java.lang.String pKey, java.lang.Object... pArgs)
          Log a resource-based log info message.
 void vlogInfo(java.lang.String pFormat, java.lang.Object... pArgs)
          Log a formatted info message.
 void vlogInfo(java.lang.Throwable pThrowable, java.util.ResourceBundle pBundle, java.lang.String pKey, java.lang.Object... pArgs)
          Log a resource-based log info message.
 void vlogInfo(java.lang.Throwable pThrowable, java.lang.String pFormat, java.lang.Object... pArgs)
          Log a formatted info message.
 void vlogTrace(java.util.ResourceBundle pBundle, java.lang.String pKey, java.lang.Object... pArgs)
          Log a resource-based log trace message.
 void vlogTrace(java.lang.String pFormat, java.lang.Object... pArgs)
          Log a formatted trace message.
 void vlogTrace(java.lang.Throwable pThrowable, java.util.ResourceBundle pBundle, java.lang.String pKey, java.lang.Object... pArgs)
          Log a resource-based log trace message.
 void vlogTrace(java.lang.Throwable pThrowable, java.lang.String pFormat, java.lang.Object... pArgs)
          Log a formatted trace message.
 void vlogWarning(java.util.ResourceBundle pBundle, java.lang.String pKey, java.lang.Object... pArgs)
          Log a resource-based log warning message.
 void vlogWarning(java.lang.String pFormat, java.lang.Object... pArgs)
          Log a formatted warning message.
 void vlogWarning(java.lang.Throwable pThrowable, java.util.ResourceBundle pBundle, java.lang.String pKey, java.lang.Object... pArgs)
          Log a resource-based log warning message.
 void vlogWarning(java.lang.Throwable pThrowable, java.lang.String pFormat, java.lang.Object... pArgs)
          Log a formatted warning message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface atg.nucleus.logging.ApplicationLogging
isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingWarning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logWarning, logWarning, logWarning, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingWarning
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

VariableArgumentApplicationLoggingImpl

public VariableArgumentApplicationLoggingImpl()
Method Detail

getLoggingForVlogging

protected abstract ApplicationLogging getLoggingForVlogging()
Return the application logging to use for variable argument logging.


vlogDebug

public void vlogDebug(java.lang.Throwable pThrowable,
                      java.util.ResourceBundle pBundle,
                      java.lang.String pKey,
                      java.lang.Object... pArgs)
Log a resource-based log debug message. The key should refer to a resource containing a format string to use. If not currently doing debug logging, then just return.

Specified by:
vlogDebug in interface VariableArgumentApplicationLogging
Parameters:
pThrowable - the exception to be logged. Will be logged after the message.
pBundle - The resoure bundle.
pKey - the resource key in the bundle to use as a format string.
pArgs - the format arguments needed by the key's format string.

vlogDebug

public void vlogDebug(java.util.ResourceBundle pBundle,
                      java.lang.String pKey,
                      java.lang.Object... pArgs)
Log a resource-based log debug message. The key should refer to a resource containing a format string to use. If not currently doing debug logging, then just return.

Specified by:
vlogDebug in interface VariableArgumentApplicationLogging
Parameters:
pBundle - The resoure bundle.
pKey - the resource key in the bundle to use as a format string.
pArgs - the format arguments needed by the key's format string.

vlogDebug

public void vlogDebug(java.lang.Throwable pThrowable,
                      java.lang.String pFormat,
                      java.lang.Object... pArgs)
Log a formatted debug message. If not currently doing debug logging, then just return.

Specified by:
vlogDebug in interface VariableArgumentApplicationLogging
Parameters:
pThrowable - the exception to be logged. Will be logged after the message.
pFormat - The format string to use. Uses MessageFormat to render.
pArgs - the format arguments needed by the key's format string.

vlogDebug

public void vlogDebug(java.lang.String pFormat,
                      java.lang.Object... pArgs)
Log a formatted debug message. If not currently doing debug logging, then just return.

Specified by:
vlogDebug in interface VariableArgumentApplicationLogging
Parameters:
pFormat - The format string to use. Uses MessageFormat to render.
pArgs - the format arguments needed by the key's format string.

vlogError

public void vlogError(java.lang.Throwable pThrowable,
                      java.util.ResourceBundle pBundle,
                      java.lang.String pKey,
                      java.lang.Object... pArgs)
Log a resource-based log error message. The key should refer to a resource containing a format string to use. If not currently doing error logging, then just return.

Specified by:
vlogError in interface VariableArgumentApplicationLogging
Parameters:
pThrowable - the exception to be logged. Will be logged after the message.
pBundle - The resoure bundle.
pKey - the resource key in the bundle to use as a format string.
pArgs - the format arguments needed by the key's format string.

vlogError

public void vlogError(java.util.ResourceBundle pBundle,
                      java.lang.String pKey,
                      java.lang.Object... pArgs)
Log a resource-based log error message. The key should refer to a resource containing a format string to use. If not currently doing error logging, then just return.

Specified by:
vlogError in interface VariableArgumentApplicationLogging
Parameters:
pBundle - The resoure bundle.
pKey - the resource key in the bundle to use as a format string.
pArgs - the format arguments needed by the key's format string.

vlogError

public void vlogError(java.lang.Throwable pThrowable,
                      java.lang.String pFormat,
                      java.lang.Object... pArgs)
Log a formatted error message. If not currently doing error logging, then just return.

Specified by:
vlogError in interface VariableArgumentApplicationLogging
Parameters:
pThrowable - the exception to be logged. Will be logged after the message.
pFormat - The format string to use. Uses MessageFormat to render.
pArgs - the format arguments needed by the key's format string.

vlogError

public void vlogError(java.lang.String pFormat,
                      java.lang.Object... pArgs)
Log a formatted error message. If not currently doing error logging, then just return.

Specified by:
vlogError in interface VariableArgumentApplicationLogging
Parameters:
pFormat - The format string to use. Uses MessageFormat to render.
pArgs - the format arguments needed by the key's format string.

vlogInfo

public void vlogInfo(java.lang.Throwable pThrowable,
                     java.util.ResourceBundle pBundle,
                     java.lang.String pKey,
                     java.lang.Object... pArgs)
Log a resource-based log info message. The key should refer to a resource containing a format string to use. If not currently doing info logging, then just return.

Specified by:
vlogInfo in interface VariableArgumentApplicationLogging
Parameters:
pThrowable - the exception to be logged. Will be logged after the message.
pBundle - The resoure bundle.
pKey - the resource key in the bundle to use as a format string.
pArgs - the format arguments needed by the key's format string.

vlogInfo

public void vlogInfo(java.util.ResourceBundle pBundle,
                     java.lang.String pKey,
                     java.lang.Object... pArgs)
Log a resource-based log info message. The key should refer to a resource containing a format string to use. If not currently doing info logging, then just return.

Specified by:
vlogInfo in interface VariableArgumentApplicationLogging
Parameters:
pBundle - The resoure bundle.
pKey - the resource key in the bundle to use as a format string.
pArgs - the format arguments needed by the key's format string.

vlogInfo

public void vlogInfo(java.lang.Throwable pThrowable,
                     java.lang.String pFormat,
                     java.lang.Object... pArgs)
Log a formatted info message. If not currently doing info logging, then just return.

Specified by:
vlogInfo in interface VariableArgumentApplicationLogging
Parameters:
pThrowable - the exception to be logged. Will be logged after the message.
pFormat - The format string to use. Uses MessageFormat to render.
pArgs - the format arguments needed by the key's format string.

vlogInfo

public void vlogInfo(java.lang.String pFormat,
                     java.lang.Object... pArgs)
Log a formatted info message. If not currently doing info logging, then just return.

Specified by:
vlogInfo in interface VariableArgumentApplicationLogging
Parameters:
pFormat - The format string to use. Uses MessageFormat to render.
pArgs - the format arguments needed by the key's format string.

vlogTrace

public void vlogTrace(java.lang.Throwable pThrowable,
                      java.util.ResourceBundle pBundle,
                      java.lang.String pKey,
                      java.lang.Object... pArgs)
Log a resource-based log trace message. The key should refer to a resource containing a format string to use. If not currently doing trace logging, then just return.

Specified by:
vlogTrace in interface VariableArgumentApplicationLogging
Parameters:
pThrowable - the exception to be logged. Will be logged after the message.
pBundle - The resoure bundle.
pKey - the resource key in the bundle to use as a format string.
pArgs - the format arguments needed by the key's format string.

vlogTrace

public void vlogTrace(java.util.ResourceBundle pBundle,
                      java.lang.String pKey,
                      java.lang.Object... pArgs)
Log a resource-based log trace message. The key should refer to a resource containing a format string to use. If not currently doing trace logging, then just return.

Specified by:
vlogTrace in interface VariableArgumentApplicationLogging
Parameters:
pBundle - The resoure bundle.
pKey - the resource key in the bundle to use as a format string.
pArgs - the format arguments needed by the key's format string.

vlogTrace

public void vlogTrace(java.lang.Throwable pThrowable,
                      java.lang.String pFormat,
                      java.lang.Object... pArgs)
Log a formatted trace message. If not currently doing trace logging, then just return.

Specified by:
vlogTrace in interface VariableArgumentApplicationLogging
Parameters:
pThrowable - the exception to be logged. Will be logged after the message.
pFormat - The format string to use. Uses MessageFormat to render.
pArgs - the format arguments needed by the key's format string.

vlogTrace

public void vlogTrace(java.lang.String pFormat,
                      java.lang.Object... pArgs)
Log a formatted trace message. If not currently doing trace logging, then just return.

Specified by:
vlogTrace in interface VariableArgumentApplicationLogging
Parameters:
pFormat - The format string to use. Uses MessageFormat to render.
pArgs - the format arguments needed by the key's format string.

vlogDebugTrace

public void vlogDebugTrace(java.lang.String pFormat,
                           java.lang.Object... pArgs)
Log a formatted trace message if debug and trace logging are both enabled. If not currently doing trace and debug logging, then just return. Use this method for debug information that is logged frequently or heavily

Parameters:
pFormat - The format string to use. Uses MessageFormat to render.
pArgs - the format arguments needed by the key's format string.

vlogWarning

public void vlogWarning(java.lang.Throwable pThrowable,
                        java.util.ResourceBundle pBundle,
                        java.lang.String pKey,
                        java.lang.Object... pArgs)
Log a resource-based log warning message. The key should refer to a resource containing a format string to use. If not currently doing warning logging, then just return.

Specified by:
vlogWarning in interface VariableArgumentApplicationLogging
Parameters:
pThrowable - the exception to be logged. Will be logged after the message.
pBundle - The resoure bundle.
pKey - the resource key in the bundle to use as a format string.
pArgs - the format arguments needed by the key's format string.

vlogWarning

public void vlogWarning(java.util.ResourceBundle pBundle,
                        java.lang.String pKey,
                        java.lang.Object... pArgs)
Log a resource-based log warning message. The key should refer to a resource containing a format string to use. If not currently doing warning logging, then just return.

Specified by:
vlogWarning in interface VariableArgumentApplicationLogging
Parameters:
pBundle - The resoure bundle.
pKey - the resource key in the bundle to use as a format string.
pArgs - the format arguments needed by the key's format string.

vlogWarning

public void vlogWarning(java.lang.Throwable pThrowable,
                        java.lang.String pFormat,
                        java.lang.Object... pArgs)
Log a formatted warning message. If not currently doing warning logging, then just return.

Specified by:
vlogWarning in interface VariableArgumentApplicationLogging
Parameters:
pThrowable - the exception to be logged. Will be logged after the message.
pFormat - The format string to use. Uses MessageFormat to render.
pArgs - the format arguments needed by the key's format string.

vlogWarning

public void vlogWarning(java.lang.String pFormat,
                        java.lang.Object... pArgs)
Log a formatted warning message. If not currently doing warning logging, then just return.

Specified by:
vlogWarning in interface VariableArgumentApplicationLogging
Parameters:
pFormat - The format string to use. Uses MessageFormat to render.
pArgs - the format arguments needed by the key's format string.

isLoggingTrace

public boolean isLoggingTrace()
Provide a default implementation for isLoggingTrace(). Default to isLoggingDebug() if our logging doesn't implement TraceApplicationLogging.