|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ibm.di.server.Log
public class Log
The Log object is used to log messages to logs. It keeps a list of different Loggers, all implementing LogInterface, and asks all of them to log.
| Nested Class Summary | |
|---|---|
static class |
Log.InternalLogger
A collection of loggers. |
| Field Summary | |
|---|---|
boolean |
debug
The debug mode flag for the log. |
| Constructor Summary | |
|---|---|
Log(Log parentLog)
A constructor taking another Log as a parameter. |
|
Log(java.lang.String resourceName)
A constructor which takes only a resource name. |
|
Log(java.lang.String resourceName,
Log.InternalLogger loggers)
Deprecated. |
|
Log(java.lang.String resourceName,
org.apache.log4j.Logger logger)
Deprecated. |
|
Log(java.lang.String resourceName,
java.lang.String category)
A constructor with both resourceName and category name |
|
| Method Summary | |
|---|---|
void |
addLogger(org.apache.log4j.Logger logger)
Deprecated. Do not use log4j directly |
void |
addLogger(LogInterface logger)
Add a LogInterface to internal list of loggers. |
void |
close()
Close the output logger |
void |
debug(java.lang.String res)
Log a message with debug level if the debug mode flag is true, otherwise an info level message is logged. |
void |
debug(java.lang.String res,
java.lang.Object param)
Log a message with debug level if the debug mode flag is true, otherwise an info level message is logged. |
void |
debug(java.lang.String res,
java.lang.Object[] params)
Log a message with debug level if the debug mode flag is true, otherwise an info level message is logged. |
void |
debug(java.lang.String res,
java.lang.Object param1,
java.lang.Object param2)
Log a message with debug level if the debug mode flag is true, otherwise an info level message is logged. |
void |
dump(java.lang.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(java.lang.String res)
Log a message with error level. |
void |
error(java.lang.String res,
java.lang.Object[] params)
Log a message with error level. |
void |
error(java.lang.String res,
java.lang.Object[] params,
java.lang.Throwable error)
Log a message with error level. |
void |
error(java.lang.String res,
java.lang.Object param,
java.lang.Throwable error)
Log a message with error level. |
void |
error(java.lang.String res,
java.lang.String param)
Log a message with error level. |
void |
error(java.lang.String res,
java.lang.String param1,
java.lang.String param2)
Log a message with error level. |
void |
error(java.lang.String res,
java.lang.Throwable error)
Log a message with error level. |
void |
exception(java.lang.String res)
Throws a new exception with a custom message. |
void |
exception(java.lang.String res,
java.lang.Object param)
Throws a new exception with a custom message. |
void |
exception(java.lang.String res,
java.lang.Object[] params)
Throws a new exception with a custom message. |
void |
exception(java.lang.String res,
java.lang.Object param1,
java.lang.Object param2)
Throws a new exception with a custom message. |
void |
fatal(java.lang.String res)
Log a message with fatal level. |
void |
fatal(java.lang.String res,
java.lang.Object param)
Log a message with fatal level. |
void |
fatal(java.lang.String res,
java.lang.Object[] params)
Log a message with fatal level. |
void |
fatal(java.lang.String res,
java.lang.Object param,
java.lang.Throwable err)
Log a message with fatal level. |
void |
fatal(java.lang.String res,
java.lang.Throwable err)
Log a message with fatal level. |
void |
fine(java.lang.String res)
Log a message with debug level. |
void |
fine(java.lang.String res,
java.lang.Object param)
Log a message with debug level. |
void |
fine(java.lang.String res,
java.lang.Object[] params)
Log a message with debug level. |
void |
fine(java.lang.String res,
java.lang.Object param1,
java.lang.Object param2)
Log a message with debug level. |
java.lang.String |
getCategory()
Returns the category for this Log |
LogInterface |
getClassLogger(java.lang.String className)
Returns a LogInterface with the given class Name. |
boolean |
getDebug()
Return the value of the debug parameter |
org.apache.log4j.Logger |
getLogger()
Deprecated. |
java.util.Vector<org.apache.log4j.Logger> |
getLoggers()
Returns a Vector containing all org.apache.log4j.Logger objects used by this Log. |
java.lang.String |
getPrefix()
Returns the prefix to be prepended to all messages |
java.lang.String |
getString(java.lang.String resource)
Return the NLS string given the resource. |
java.lang.String |
getString(java.lang.String resource,
java.lang.Object param)
Return the NLS string given the resource and a parameter. |
java.lang.String |
getString(java.lang.String resource,
java.lang.Object[] params)
Return the NLS string given the resource and an array of parameters |
java.lang.String |
getString(java.lang.String resource,
java.lang.Object param1,
java.lang.Object param2)
Return the NLS string given the resource and two parameters |
TDILog4j |
getTDILog4j()
Returns a TDILog4j Logger connected to this Log object. |
void |
info(java.lang.String res)
Log a message with info level. |
void |
info(java.lang.String res,
java.lang.Object param)
Log a message with info level. |
void |
info(java.lang.String res,
java.lang.Object[] params)
Log a message with info level. |
void |
info(java.lang.String res,
java.lang.Object param1,
java.lang.Object param2)
Log a message with info level. |
boolean |
isDebugEnabled()
Checks whether debug is enabled. |
static boolean |
isLoggingEnabled()
Returns whether TDI logging is active or disabled. |
void |
log(java.lang.String level,
java.lang.String msg)
Log a message with the specified level. |
void |
logdebug(java.lang.String msg)
Log a message with info level if the debug mode flag is true,
otherwise an debug level message is logged. |
void |
logerror(java.lang.String msg)
Log a message with error level. |
void |
logerror(java.lang.String msg,
java.lang.Throwable error)
Log a message with error level with an additional Throwable object. |
void |
logfatal(java.lang.String msg)
Log a message with fatal level. |
void |
logfine(java.lang.String msg)
Logs a message to the output stream. |
void |
loginfo(java.lang.String msg)
Log a message with info level. |
void |
logwarn(java.lang.String msg)
Log a message with warning level. |
void |
removeLogger(LogInterface logger)
Remove a LogInterface from the internal list of loggers. |
void |
setCategory(java.lang.String category)
Sets the category for this Log |
void |
setDebug(boolean debug)
Sets debug parameter |
void |
setLogger(org.apache.log4j.Logger logger)
Deprecated. Do not use log4j directly |
static void |
setLoggingEnabled()
Checks the com.ibm.di.logging.enabled property to see if logging is enabled |
static void |
setLoggingEnabled(boolean enabled)
Disables or enables TDI logging. |
void |
setPrefix(java.lang.String prefix)
Sets a prefix to be prepended to all messages |
void |
warn(java.lang.String res)
Log a message with warning level. |
void |
warn(java.lang.String res,
java.lang.Object param)
Log a message with warning level. |
void |
warn(java.lang.String res,
java.lang.Object[] params)
Log a message with warning level. |
void |
warn(java.lang.String res,
java.lang.Object param1,
java.lang.Object param2)
Log a message with warning level. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public boolean debug
| Constructor Detail |
|---|
public Log(java.lang.String resourceName)
resourceName - Name used both as translation resource name and the category
name
public Log(java.lang.String resourceName,
java.lang.String category)
resourceName - Name used for locating translation resourcecategory - The category name for the loggers
@Deprecated
public Log(java.lang.String resourceName,
org.apache.log4j.Logger logger)
resourceName - Name used for locating translation resourcelogger - A Logger added to the list of loggerspublic Log(Log parentLog)
parentLog - The other Log
@Deprecated
public Log(java.lang.String resourceName,
Log.InternalLogger loggers)
resourceName - Name used for locating translation resourceloggers - Used as the list of loggers| Method Detail |
|---|
@Deprecated public org.apache.log4j.Logger getLogger()
public java.util.Vector<org.apache.log4j.Logger> getLoggers()
@Deprecated public void setLogger(org.apache.log4j.Logger logger)
logger - The new Logger object.@Deprecated public void addLogger(org.apache.log4j.Logger logger)
logger - The new Logger objectpublic void addLogger(LogInterface logger)
logger - The new LogInterface object.public void removeLogger(LogInterface logger)
logger - The LogInterface object.public TDILog4j getTDILog4j()
public LogInterface getClassLogger(java.lang.String className)
throws java.lang.Exception
className - The class name
java.lang.Exception - if problem occurspublic void setDebug(boolean debug)
debug - true if debug level should be output as infopublic boolean getDebug()
boolean valuepublic boolean isDebugEnabled()
public static void setLoggingEnabled()
public static void setLoggingEnabled(boolean enabled)
enabled - if true all loggers are enabled, otherwise they
are disabledpublic static boolean isLoggingEnabled()
true if logging is enabled, otherwise
falsepublic void setCategory(java.lang.String category)
category - The categorypublic java.lang.String getCategory()
public void setPrefix(java.lang.String prefix)
prefix - public java.lang.String getPrefix()
public java.lang.String getString(java.lang.String resource)
resource - the given resource
public java.lang.String getString(java.lang.String resource,
java.lang.Object param)
resource - the given resourceparam - a parameter
public java.lang.String getString(java.lang.String resource,
java.lang.Object param1,
java.lang.Object param2)
resource - the given resourceparam1 - a parameterparam2 - a parameter
public java.lang.String getString(java.lang.String resource,
java.lang.Object[] params)
resource - the given resourceparams - an array of parameters
public void close()
public void logfine(java.lang.String msg)
msg - The message to log.public void logdebug(java.lang.String msg)
true,
otherwise an debug level message is logged. This is done for all used
loggers.
msg - the message to logpublic void loginfo(java.lang.String msg)
msg - the message to logpublic void logwarn(java.lang.String msg)
msg - the message to logpublic void logerror(java.lang.String msg)
msg - the message to log
public void logerror(java.lang.String msg,
java.lang.Throwable error)
msg - the message to logerror - the Throwable to be loggedpublic void logfatal(java.lang.String msg)
msg - the message to logpublic void fine(java.lang.String res)
res - the resource used for the message
public void fine(java.lang.String res,
java.lang.Object param)
res - the resource used for the messageparam - a parameter for the message
public void fine(java.lang.String res,
java.lang.Object param1,
java.lang.Object param2)
res - the resource used for the messageparam1 - a parameter for the messageparam2 - a parameter for the message
public void fine(java.lang.String res,
java.lang.Object[] params)
res - the resource used for the messageparams - an array with parameters for the messagepublic void debug(java.lang.String res)
true, otherwise an info level message is logged. This is
done for all used loggers. The message is a NLS string formed using the
resource given.
res - the resource used for the message
public void debug(java.lang.String res,
java.lang.Object param)
true, otherwise an info level message is logged. This is
done for all used loggers. The message is a NLS string formed using the
resource and includes a parameter.
res - the resource used for the messageparam - a parameter for the message
public void debug(java.lang.String res,
java.lang.Object param1,
java.lang.Object param2)
true, otherwise an info level message is logged. This is
done for all used loggers. The message is a NLS string formed using the
resource and includes two additional parameters.
res - the resource used for the messageparam1 - a parameter for the messageparam2 - a parameter for the message
public void debug(java.lang.String res,
java.lang.Object[] params)
true, otherwise an info level message is logged. This is
done for all used loggers. The message is a NLS string formed using the
resource and includes array with parameters.
res - the resource used for the messageparams - an array with parameters for the messagepublic void info(java.lang.String res)
res - the resource used for the message
public void info(java.lang.String res,
java.lang.Object param)
res - the resource used for the messageparam - a parameter for the message
public void info(java.lang.String res,
java.lang.Object param1,
java.lang.Object param2)
res - the resource used for the messageparam1 - a parameter for the messageparam2 - a parameter for the message
public void info(java.lang.String res,
java.lang.Object[] params)
res - the resource used for the messageparams - an array with parameters for the messagepublic void warn(java.lang.String res)
res - the resource used for the message
public void warn(java.lang.String res,
java.lang.Object param)
res - the resource used for the messageparam - a parameter for the message
public void warn(java.lang.String res,
java.lang.Object param1,
java.lang.Object param2)
res - the resource used for the messageparam1 - a parameter for the messageparam2 - a parameter for the message
public void warn(java.lang.String res,
java.lang.Object[] params)
res - the resource used for the messageparams - an array with parameters for the messagepublic void error(java.lang.String res)
res - the resource used for the message
public void error(java.lang.String res,
java.lang.Throwable error)
res - the resource used for the messageerror - the Throwable to be logged
public void error(java.lang.String res,
java.lang.String param)
res - the resource used for the messageparam - a parameter for the message
public void error(java.lang.String res,
java.lang.Object param,
java.lang.Throwable error)
res - the resource used for the messageparam - a parameter for the messageerror - the Throwable to be logged
public void error(java.lang.String res,
java.lang.String param1,
java.lang.String param2)
res - the resource used for the messageparam1 - a parameter for the messageparam2 - a parameter for the message
public void error(java.lang.String res,
java.lang.Object[] params)
res - the resource used for the messageparams - an array with parameters for the message
public void error(java.lang.String res,
java.lang.Object[] params,
java.lang.Throwable error)
res - the resource used for the messageparams - an array with parameters for the messageerror - the Throwable to be loggedpublic void fatal(java.lang.String res)
res - the resource used for the message
public void fatal(java.lang.String res,
java.lang.Throwable err)
res - the resource used for the messageerr - the Throwable to be logged
public void fatal(java.lang.String res,
java.lang.Object param)
res - the resource used for the messageparam - a parameter for the message
public void fatal(java.lang.String res,
java.lang.Object param,
java.lang.Throwable err)
res - the resource used for the messageparam - a parameter for the messageerr - the Throwable to be logged
public void fatal(java.lang.String res,
java.lang.Object[] params)
res - the resource used for the messageparams - parameters for the message
public void log(java.lang.String level,
java.lang.String msg)
level - The level to use when loggingmsg - The string to be logged
public void exception(java.lang.String res)
throws java.lang.Exception
res - the resource used for the message
java.lang.Exception - the thrown exception
public void exception(java.lang.String res,
java.lang.Object param)
throws java.lang.Exception
res - the resource used for the messageparam - a parameter for the message
java.lang.Exception - the thrown exception
public void exception(java.lang.String res,
java.lang.Object param1,
java.lang.Object param2)
throws java.lang.Exception
res - the resource used for the messageparam1 - a parameter for the messageparam2 - a parameter for the message
java.lang.Exception - the thrown exception
public void exception(java.lang.String res,
java.lang.Object[] params)
throws java.lang.Exception
res - the resource used for the messageparams - parameters for the message
java.lang.Exception - the thrown exceptionpublic void dumpEntry(Entry e)
e - The entry to dumpdump(java.lang.Object)public void dump(java.lang.Object o)
o - The entry to dumpdumpEntry(com.ibm.di.entry.Entry)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||