Sonic ESB API

com.sonicsw.xq
Interface XQLog


public interface XQLog

The XQLog provides users with the ability to write to the container log file at runtime. It provides methods that allow the logging of messages in either String or Throwable format. Messages are partitioned into different severities. The severities that are supported are informative, warning, and error.

See Also:
XQInitContext

Method Summary
 java.io.PrintWriter getPrintWriter()
          Returns a PrintWriter for logging informational messages;
 boolean isDebugLoggingEnabled()
          Returns whether or not debug logging has been enabled.
 void logDebug(java.lang.String msg)
          Writes the debug message into the log.
 void logDebug(java.lang.Throwable throwable)
          Writes the debug stack trace for the throwable object into the log.
 void logError(java.lang.String msg)
          Writes the error message into the log.
 void logError(java.lang.Throwable throwable)
          Writes the error stack trace for the throwable object into the log.
 void logInformation(java.lang.String msg)
          Writes the information message into the log.
 void logInformation(java.lang.Throwable throwable)
          Writes the information stack trace for the throwable object into the log.
 void logWarning(java.lang.String msg)
          Writes the warning message into the log.
 void logWarning(java.lang.Throwable throwable)
          Writes the warning stack trace for the throwable object into the log.
 

Method Detail

logInformation

void logInformation(java.lang.String msg)
Writes the information message into the log.

Parameters:
msg - information message. This value must not be null.

logInformation

void logInformation(java.lang.Throwable throwable)
Writes the information stack trace for the throwable object into the log.

Parameters:
throwable - informational Throwable object. This object must not be null.

logWarning

void logWarning(java.lang.String msg)
Writes the warning message into the log.

Parameters:
msg - warning message. This value must not be null.

logWarning

void logWarning(java.lang.Throwable throwable)
Writes the warning stack trace for the throwable object into the log.

Parameters:
throwable - warning Throwable object. This object must not be null.

logError

void logError(java.lang.String msg)
Writes the error message into the log.

Parameters:
msg - error message. This value must not be null.

logError

void logError(java.lang.Throwable throwable)
Writes the error stack trace for the throwable object into the log.

Parameters:
throwable - error Throwable object. This object must not be null.

getPrintWriter

java.io.PrintWriter getPrintWriter()
Returns a PrintWriter for logging informational messages;


logDebug

void logDebug(java.lang.String msg)
Writes the debug message into the log.

Parameters:
msg - debug message. This value must not be null. The debug msg object is accepted only if the log has been set to accept debug log items. The log can be set at config or runtime by setting the XQContainer trace mask, using management tools. The mask is a bit mask that defines which debug trace messages should be logged by the XQContainer component. Components log debug messages using their context [IComponentContext.logMessage()]. All debug loging should provide a log severity of Level.TRACE. A mask value of 0 (zero) or less indicates to the component that it should log no debug messages. The following list of values are reserved and used by components which extend the AbstractComponent like an XQContainer(some default debug logging is provided using those values): 1 - verbose Intended to be combined with other mask values to provide a more detailed output. By itself (i.e. a TraceMask of value 1) will not produc any debug output. 2 - set attributes When an attribute exposed by the component is set a message will be logged that indicates the name of the attribute being set. When combined with the "detailed" mask value, the before and after value will be logged (using toString() to display the values). 4 - operation invoked When a management operation is invoked a message will be logged indicating the invoked operation name and signature. When combined with the "detailed" mask value, the arguments and return values will be logged (using toString() to display the values). 8 - notification sent When a notification is published a message will be logged indicating the notification type and severity. When combined with the "detailed" mask value, the notification attributes, if any, will be logged. 32 - XQContainer trace When an XQContainer component (or any of its sub-components) wish to log a debug message.

logDebug

void logDebug(java.lang.Throwable throwable)
Writes the debug stack trace for the throwable object into the log.

Parameters:
throwable - error Throwable object. This object must not be null. The debug Throwable object is accepted only if the log has been set to accept debug log items. The log can be set at config or runtime by setting the XQContainer trace mask, using management tools. The mask is a bit mask that defines which debug trace messages should be logged by the XQContainer component. Components log debug messages using their context [IComponentContext.logMessage()]. All debug loging should provide a log severity of Level.TRACE. A mask value of 0 (zero) or less indicates to the component that it should log no debug messages. The following list of values are reserved and used by components which extend the AbstractComponent like an XQContainer(some default debug logging is provided using those values): 1 - verbose Intended to be combined with other mask values to provide a more detailed output. By itself (i.e. a TraceMask of value 1) will not produc any debug output. 2 - set attributes When an attribute exposed by the component is set a message will be logged that indicates the name of the attribute being set. When combined with the "detailed" mask value, the before and after value will be logged (using toString() to display the values). 4 - operation invoked When a management operation is invoked a message will be logged indicating the invoked operation name and signature. When combined with the "detailed" mask value, the arguments and return values will be logged (using toString() to display the values). 8 - notification sent When a notification is published a message will be logged indicating the notification type and severity. When combined with the "detailed" mask value, the notification attributes, if any, will be logged. 32 - XQContainer trace When an XQContainer component (or any of its sub-components) wish to log a debug message.

isDebugLoggingEnabled

boolean isDebugLoggingEnabled()
Returns whether or not debug logging has been enabled.


Sonic ESB API

Copyright © 2001-2012 Progress Software Corporation. All Rights Reserved.
HTML formatted on 13-Mar-2012.