com.tivoli.jflt
Class GenericLoggerSupport

java.lang.Object
  |
  +--com.tivoli.jflt.GenericLoggerSupport

public class GenericLoggerSupport
extends java.lang.Object
implements GenericLogger

It provides an implemenation of the GenericLogger interface. This class is the primary interface to the application programmer by supplying the methods for information logging.

Version:
1.1
Author:
Cosimo Vampo, Raimondo Castino

Field Summary
protected  LogAdapter adapter
          The specialization (plug-in) used for writing the logging messages.
protected  LogCatalog catalog
          The catalog class used for retrieving messages text from keys.
 
Constructor Summary
protected GenericLoggerSupport(LoggerParameters params, long managerId)
          Creates a new GenericLogger.
 
Method Summary
 LogCatalog getMessageCatalog()
          Returns the message catalog associated with the logger.
 boolean isLogging()
          Determines if a logger is logging data (true) or not ( false).
 void log(long type, java.lang.Object loggingClass, java.lang.String loggingMethod, java.lang.String text)
          Logs a text message.
 void message(long type, java.lang.Object loggingClass, java.lang.String loggingMethod, java.lang.String key)
          Logs a message, by key, with no parameters.
 void message(long type, java.lang.Object loggingClass, java.lang.String loggingMethod, java.lang.String key, java.lang.Object param1)
          Logs a message, by key, with one parameter.
 void message(long type, java.lang.Object loggingClass, java.lang.String loggingMethod, java.lang.String key, java.lang.Object[] params)
          Logs a message, by key, with an array of parameters.
 void message(long type, java.lang.Object loggingClass, java.lang.String loggingMethod, java.lang.String key, java.lang.Object param1, java.lang.Object param2)
          Logs a message, by key, with two parameters.
 void setLogging(boolean flag)
          Sets a flag that indicates whether the logger is logging data (true ) or not (false).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

adapter

protected volatile LogAdapter adapter
The specialization (plug-in) used for writing the logging messages.

catalog

protected volatile LogCatalog catalog
The catalog class used for retrieving messages text from keys.
Constructor Detail

GenericLoggerSupport

protected GenericLoggerSupport(LoggerParameters params,
                               long managerId)
Creates a new GenericLogger.
Method Detail

isLogging

public boolean isLogging()
Determines if a logger is logging data (true) or not ( false). The returned value is the result of the AND operation between the local variable and the settings in the specialization level.

setLogging

public void setLogging(boolean flag)
Sets a flag that indicates whether the logger is logging data (true ) or not (false).

log

public void log(long type,
                java.lang.Object loggingClass,
                java.lang.String loggingMethod,
                java.lang.String text)
Logs a text message.
Specified by:
log in interface GenericLogger
Parameters:
type - The message type.
loggingClass - The class name or handle of the logging class.
loggingMethod - The name of the logging method.
text - The message text.

message

public void message(long type,
                    java.lang.Object loggingClass,
                    java.lang.String loggingMethod,
                    java.lang.String key)
Logs a message, by key, with no parameters.
Specified by:
message in interface GenericLogger
Parameters:
type - The message type.
loggingClass - The class name or handle of the logging class.
loggingMethod - The name of the logging method.
key - The message key.

message

public void message(long type,
                    java.lang.Object loggingClass,
                    java.lang.String loggingMethod,
                    java.lang.String key,
                    java.lang.Object param1)
Logs a message, by key, with one parameter.
Specified by:
message in interface GenericLogger
Parameters:
type - The message type.
loggingClass - The class name or handle of the logging class.
loggingMethod - The name of the logging method.
key - The message key.
parm1 - An element to be inserted into the message.

message

public void message(long type,
                    java.lang.Object loggingClass,
                    java.lang.String loggingMethod,
                    java.lang.String key,
                    java.lang.Object param1,
                    java.lang.Object param2)
Logs a message, by key, with two parameters.
Specified by:
message in interface GenericLogger
Parameters:
type - The message type.
loggingClass - The class name or handle of the logging class.
loggingMethod - The name of the logging method.
key - The message key.
parm1 - An element to be inserted into the message.
parm2 - An element to be inserted into the message.

message

public void message(long type,
                    java.lang.Object loggingClass,
                    java.lang.String loggingMethod,
                    java.lang.String key,
                    java.lang.Object[] params)
Logs a message, by key, with an array of parameters.
Specified by:
message in interface GenericLogger
Parameters:
type - The message type.
loggingClass - The class name or handle of the logging class.
loggingMethod - The name of the logging method.
key - The message key.
parms - An array of elements to be inserted into the message.

getMessageCatalog

public LogCatalog getMessageCatalog()
Returns the message catalog associated with the logger.
Specified by:
getMessageCatalog in interface GenericLogger
Tags copied from interface: GenericLogger
Returns:
An implementation of the LogCatalog interface.