com.ibm.di.server
Class Log

java.lang.Object
  extended by com.ibm.di.server.Log
All Implemented Interfaces:
Serializable

public class Log
extends Object
implements Serializable

See Also:
Serialized Form

Nested Class Summary
 class Log.InternalLogger
           
 
Field Summary
 boolean debug
           
 
Constructor Summary
Log(String category)
          The Log object is used to log messages to log files
Log(String category, Log.InternalLogger logger)
           
Log(String category, org.apache.log4j.Logger logger)
           
Log(String category, String componentname)
           
 
Method Summary
 void addLogger(org.apache.log4j.Logger logger)
           
 void close()
          Close the output logger
 void debug(String res)
           
 void debug(String res, Object param)
           
 void debug(String res, Object[] params)
           
 void debug(String res, Object param1, Object param2)
           
 void dump(Object o)
          This methods dumps an Object to the log file.
 void dumpEntry(Entry e)
          Dumps a formatted message to the logfile from the contents of an Entry
 void error(String res)
           
 void error(String res, Object[] params)
           
 void error(String res, Object[] params, Throwable error)
           
 void error(String res, Object param, Throwable error)
           
 void error(String res, String param)
           
 void error(String res, String param1, String param2)
           
 void error(String res, Throwable error)
           
 void exception(String res)
           
 void exception(String res, Object param)
           
 void exception(String res, Object[] params)
           
 void exception(String res, Object param1, Object param2)
           
 void fatal(String res)
           
 void fatal(String res, Object param)
           
 void fatal(String res, Object[] params)
           
 void fatal(String res, Object param, Throwable err)
           
 void fatal(String res, Throwable err)
           
 void fine(String res)
           
 void fine(String res, Object param)
           
 void fine(String res, Object[] params)
           
 void fine(String res, Object param1, Object param2)
           
 boolean getDebug()
          Return the value of the debug parameter
 org.apache.log4j.Logger getLogger()
           
 Vector getLoggers()
           
 String getPrefix()
          Returns the prefix to be prepended to all messages
 String getString(String resource)
          Return the NLS string given the resource
 String getString(String resource, Object param)
          Return the NLS string given the resource and a parameter
 String getString(String resource, Object[] params)
          Return the NLS string given the resource and an array of parameters
 String getString(String resource, Object param1, Object param2)
          Return the NLS string given the resource and two parameters
 void info(String res)
           
 void info(String res, Object param)
           
 void info(String res, Object[] params)
           
 void info(String res, Object param1, Object param2)
           
 void log(String level, String msg)
           
 void logdebug(String msg)
           
 void logerror(String msg)
           
 void logerror(String msg, Throwable error)
           
 void logfatal(String msg)
           
 void logfine(String msg)
          Logs a message to the output stream.
 void loginfo(String msg)
           
 void logwarn(String msg)
           
 void setDebug(boolean debug)
          Sets debug parameter
 void setLogger(org.apache.log4j.Logger logger)
           
 void setPrefix(String prefix)
          Sets a prefix to be prepended to all messages
 void warn(String res)
           
 void warn(String res, Object param)
           
 void warn(String res, Object[] params)
           
 void warn(String res, Object param1, Object param2)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

public boolean debug
Constructor Detail

Log

public Log(String category)
The Log object is used to log messages to log files


Log

public Log(String category,
           String componentname)

Log

public Log(String category,
           org.apache.log4j.Logger logger)

Log

public Log(String category,
           Log.InternalLogger logger)
Method Detail

getLogger

public org.apache.log4j.Logger getLogger()
Returns:
The "first" Logger object used by this Log

getLoggers

public Vector getLoggers()

setLogger

public void setLogger(org.apache.log4j.Logger logger)

addLogger

public void addLogger(org.apache.log4j.Logger logger)

setDebug

public void setDebug(boolean debug)
Sets debug parameter

Parameters:
debug - true if debug level should be output as info

getDebug

public boolean getDebug()
Return the value of the debug parameter


setPrefix

public void setPrefix(String prefix)
Sets a prefix to be prepended to all messages

Parameters:
prefix -

getPrefix

public String getPrefix()
Returns the prefix to be prepended to all messages


getString

public String getString(String resource)
Return the NLS string given the resource


getString

public String getString(String resource,
                        Object param)
Return the NLS string given the resource and a parameter


getString

public String getString(String resource,
                        Object param1,
                        Object param2)
Return the NLS string given the resource and two parameters


getString

public String getString(String resource,
                        Object[] params)
Return the NLS string given the resource and an array of parameters


close

public void close()
Close the output logger


logfine

public void logfine(String msg)
Logs a message to the output stream.

Parameters:
msg - The message to log.

logdebug

public void logdebug(String msg)

loginfo

public void loginfo(String msg)

logwarn

public void logwarn(String msg)

logerror

public void logerror(String msg)

logerror

public void logerror(String msg,
                     Throwable error)

logfatal

public void logfatal(String msg)

fine

public void fine(String res)

fine

public void fine(String res,
                 Object param)

fine

public void fine(String res,
                 Object param1,
                 Object param2)

fine

public void fine(String res,
                 Object[] params)

debug

public void debug(String res)

debug

public void debug(String res,
                  Object param)

debug

public void debug(String res,
                  Object param1,
                  Object param2)

debug

public void debug(String res,
                  Object[] params)

info

public void info(String res)

info

public void info(String res,
                 Object param)

info

public void info(String res,
                 Object param1,
                 Object param2)

info

public void info(String res,
                 Object[] params)

warn

public void warn(String res)

warn

public void warn(String res,
                 Object param)

warn

public void warn(String res,
                 Object param1,
                 Object param2)

warn

public void warn(String res,
                 Object[] params)

error

public void error(String res)

error

public void error(String res,
                  Throwable error)

error

public void error(String res,
                  String param)

error

public void error(String res,
                  Object param,
                  Throwable error)

error

public void error(String res,
                  String param1,
                  String param2)

error

public void error(String res,
                  Object[] params)

error

public void error(String res,
                  Object[] params,
                  Throwable error)

fatal

public void fatal(String res)

fatal

public void fatal(String res,
                  Throwable err)

fatal

public void fatal(String res,
                  Object param)

fatal

public void fatal(String res,
                  Object param,
                  Throwable err)

fatal

public void fatal(String res,
                  Object[] params)

log

public void log(String level,
                String msg)

exception

public void exception(String res)
               throws Exception
Throws:
Exception

exception

public void exception(String res,
                      Object param)
               throws Exception
Throws:
Exception

exception

public void exception(String res,
                      Object param1,
                      Object param2)
               throws Exception
Throws:
Exception

exception

public void exception(String res,
                      Object[] params)
               throws Exception
Throws:
Exception

dumpEntry

public void dumpEntry(Entry e)
Dumps a formatted message to the logfile from the contents of an Entry

Parameters:
e - The entry to dump
See Also:
dump(java.lang.Object)

dump

public void dump(Object o)
This methods dumps an Object to the log file.

Parameters:
o - The entry to dump
See Also:
dumpEntry(com.ibm.di.entry.Entry)