org.cafesip.jiplet
Class JipletLogger

java.lang.Object
  extended by org.cafesip.jiplet.JipletLogger

public class JipletLogger
extends java.lang.Object

This class encapsulates the logging functions of the jiplet container. It is a singleton class that contains methods to print log messages from the jiplets and other areas of the container. The jiplets must not use this class directly. Instead they must use the logging methods provided in the Jiplet class.

For the standalone jiplet container application, LOG4J is used. Logging can be controlled by modifying the conf/log4j.xml.The file is a XML file and it follows the standard configuration options specified by LOG4J. When the container runs as a JBOSS service, it integrates with the JBOSS logging services.


Method Summary
static void configLogger(JipletLoggerPlugin logger)
          Static method to configure the logging capabilties.
static void debug(java.lang.String message)
          Print a debug message
static void error(java.lang.String message)
          Print an error message.
static void fatal(java.lang.String message)
          Print a fatal error message.
static java.lang.String getStackTrace(java.lang.Throwable exception)
          Returns a string containing the stack trace given an exception.
static void info(java.lang.String message)
          Print a informational message.
static boolean isDebugEnabled()
          returns true if debug mode is enabled.
static boolean isInit()
          Returns true if the logger is initialized, false otherwise.
static void warn(java.lang.String message)
          Print a warning message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

configLogger

public static void configLogger(JipletLoggerPlugin logger)
Static method to configure the logging capabilties. The standalone jiplet application uses LOG4J whereas the JBOSS service configures the logger to use internal JBOSS logging service.

Parameters:
logger - configuration object

info

public static void info(java.lang.String message)
Print a informational message.

Parameters:
message - message to print.

warn

public static void warn(java.lang.String message)
Print a warning message.

Parameters:
message - message to print.

error

public static void error(java.lang.String message)
Print an error message.

Parameters:
message - message to print.

fatal

public static void fatal(java.lang.String message)
Print a fatal error message.

Parameters:
message - message to print.

debug

public static void debug(java.lang.String message)
Print a debug message

Parameters:
message - message to print.

isDebugEnabled

public static boolean isDebugEnabled()
returns true if debug mode is enabled.

Returns:

isInit

public static boolean isInit()
Returns true if the logger is initialized, false otherwise.

Returns:
Returns the init.

getStackTrace

public static java.lang.String getStackTrace(java.lang.Throwable exception)
Returns a string containing the stack trace given an exception.

Parameters:
exception - the exception object.
Returns:
string containing the stack trace.


http://www.cafesip.org