com.ibm.commerce.ras
Class ECLoggingProvider

java.lang.Object
  |
  +--com.ibm.commerce.ras.ECLoggingProvider
All Implemented Interfaces:
ILoggingService

public final class ECLoggingProvider
extends java.lang.Object
implements ILoggingService

ECLoggingProvider is used to configure the messages and write to output.


Field Summary
static java.lang.String COPYRIGHT
           
 
Method Summary
 void disable(long messageSeverity)
          This method is called to disable a specific message severity
 void disable(java.lang.String messageSeverity)
          This method is called to disable a specific message severity
 void disableLogging()
          This method is called to disable message logging
 void enable(long messageSeverity)
          This method is called to enable a specific message severity
 void enable(java.lang.String messageSeverity)
          This method is called to enable a specific message severity
 void enableLogging()
          This method is called to enable message logging
protected  void finalize()
          Method to perform garbage collect when ECMessageLog is no longer referenced.
static java.lang.String getNotificationClassName()
          This method is called to get the class name of Error Notification
static long getSeverity(java.lang.Object sev)
          This method is called to get the Logging Severity
static ECLoggingProvider getUniqueInstance()
           
 boolean isLoggable(ECMessage msg)
          Determines if a log entry will be processed by the logger and any of the handlers.
static boolean isLoggable(long type)
          Determines if a log entry will be processed by the logger and any of the handlers.
 boolean isLoggingEnabled()
          This method is called to check if a specific message severity is enabled.
 void out(ECMessage msg, java.lang.String className, java.lang.String methodName)
          Writes the specified ECMessage to the log file.
 void out(ECMessage msg, java.lang.String className, java.lang.String methodName, java.lang.Object[] parms)
          Writes the specified ECMessage to the log file.
 void out(ECMessage msg, java.lang.String className, java.lang.String methodName, java.lang.Object[] parms, java.lang.Throwable exc)
          Writes the specified ECMessage to the log file.
 void outputMessage(ECMessage msg, java.lang.String className, java.lang.String methodName, java.lang.Object[] params)
          Writes the specified ECMessage to the log file.
 void outputMessage(ECMessage msg, java.lang.String className, java.lang.String methodName, java.lang.Object[] params, java.lang.Throwable exception)
          Writes the specified ECMessage to the log file.
 void overrideMask(long messageSeverity)
           
static void setNotificationClassName(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
Method Detail

disable

public void disable(long messageSeverity)
This method is called to disable a specific message severity
Specified by:
disable in interface ILoggingService
Parameters:
message - severity long

disable

public void disable(java.lang.String messageSeverity)
This method is called to disable a specific message severity
Specified by:
disable in interface ILoggingService
Parameters:
message - severity String

disableLogging

public void disableLogging()
This method is called to disable message logging
Specified by:
disableLogging in interface ILoggingService

enable

public void enable(long messageSeverity)
This method is called to enable a specific message severity
Specified by:
enable in interface ILoggingService
Parameters:
message - severity long

enable

public void enable(java.lang.String messageSeverity)
This method is called to enable a specific message severity
Specified by:
enable in interface ILoggingService
Parameters:
message - severity String

enableLogging

public void enableLogging()
This method is called to enable message logging
Specified by:
enableLogging in interface ILoggingService

finalize

protected void finalize()
Method to perform garbage collect when ECMessageLog is no longer referenced.
Overrides:
finalize in class java.lang.Object

getNotificationClassName

public static java.lang.String getNotificationClassName()
This method is called to get the class name of Error Notification

getSeverity

public static long getSeverity(java.lang.Object sev)
This method is called to get the Logging Severity

There are five type of severity: ERROR, DEBUG, WARNING,STATUS, INFO


getUniqueInstance

public static ECLoggingProvider getUniqueInstance()

isLoggable

public boolean isLoggable(ECMessage msg)
Determines if a log entry will be processed by the logger and any of the handlers. Wrapping a message or trace call with this method can improve performance. Log entries that will not be processed need not even be built. For example:
 if (isLoggable(RASTraceEvent.TYPE_PUBLIC)
   trace(RASTraceEvent.TYPE_PUBLIC...);
 
Specified by:
isLoggable in interface ILoggingService
Parameters:
type - The type of the log entry. The set of possible values is defined by the RASIMessageEvent.TYPE_XXXX or RASITraceEvent.TYPE_XXXX constants.
Returns:
true if the logger is enabled and at least one handler will process the log entry; false, otherwise.

isLoggable

public static boolean isLoggable(long type)
Determines if a log entry will be processed by the logger and any of the handlers. Wrapping a message or trace call with this method can improve performance. Log entries that will not be processed need not even be built. For example:
 if (isLoggable(RASTraceEvent.TYPE_PUBLIC)
   trace(RASTraceEvent.TYPE_PUBLIC...);
 
Parameters:
type - The type of the log entry. The set of possible values is defined by the RASIMessageEvent.TYPE_XXXX or RASITraceEvent.TYPE_XXXX constants.
Returns:
true if the logger is enabled and at least one handler will process the log entry; false, otherwise.

isLoggingEnabled

public boolean isLoggingEnabled()
Description copied from interface: ILoggingService
This method is called to check if a specific message severity is enabled.
Specified by:
isLoggingEnabled in interface ILoggingService

out

public void out(ECMessage msg,
                java.lang.String className,
                java.lang.String methodName)
Writes the specified ECMessage to the log file.
Specified by:
out in interface ILoggingService
Parameters:
msg - The ECMessage object whose text is written to the log.
classname - The name of the class that issued the logging of this ECMessage.
methodName - The name of the method that issued the logging of this ECMessage.

out

public void out(ECMessage msg,
                java.lang.String className,
                java.lang.String methodName,
                java.lang.Object[] parms)
Writes the specified ECMessage to the log file.
Specified by:
out in interface ILoggingService
Parameters:
msg - The ECMessage object whose text is written to the log.
classname - The name of the class that issued the logging of this ECMessage.
methodName - The name of the method that issued the logging of this ECMessage.
parms - The list of parameters that will be substituted into the message text.

out

public void out(ECMessage msg,
                java.lang.String className,
                java.lang.String methodName,
                java.lang.Object[] parms,
                java.lang.Throwable exc)
Writes the specified ECMessage to the log file.
Specified by:
out in interface ILoggingService
Parameters:
msg - The ECMessage object whose text is written to the log.
classname - The name of the class that issued the logging of this ECMessage.
methodName - The name of the method that issued the logging of this ECMessage.
parms - The list of parameters that will be substituted into the message text.
Throwable - exception.

outputMessage

public void outputMessage(ECMessage msg,
                          java.lang.String className,
                          java.lang.String methodName,
                          java.lang.Object[] params)
Writes the specified ECMessage to the log file.
Parameters:
msg - The ECMessage object whose text is written to the log.
classname - The name of the class that issued the logging of this ECMessage.
methodName - The name of the method that issued the logging of this ECMessage.
parms - The list of parameters that will be substituted into the message text.

outputMessage

public void outputMessage(ECMessage msg,
                          java.lang.String className,
                          java.lang.String methodName,
                          java.lang.Object[] params,
                          java.lang.Throwable exception)
Writes the specified ECMessage to the log file.
Parameters:
msg - The ECMessage object whose text is written to the log.
classname - The name of the class that issued the logging of this ECMessage.
methodName - The name of the method that issued the logging of this ECMessage.
parms - The list of parameters that will be substituted into the message text.
Throwable - exception.

overrideMask

public void overrideMask(long messageSeverity)

setNotificationClassName

public static void setNotificationClassName(java.lang.String name)