de.unidu.is.util
Class Log

java.lang.Object
  extended byde.unidu.is.util.Log

public class Log
extends java.lang.Object

Provides utiliy methods for tje LOG4J framework.

This class expects the LOG4J configuration file in conf/log4j. Additional configuration files can be loaded.

Since:
2001-08-27
Version:
$Revision: 1.14 $, $Date: 2005/03/14 17:33:13 $
Author:
Henrik Nottelmann

Constructor Summary
Log()
           
 
Method Summary
static void addConfigFile(java.net.URL url)
          Initialises this class.
static void error(java.lang.String msg)
          Logs a message to the unidu.error logger.
static void error(java.lang.Throwable ex)
          Logs an exception to the unidu.error logger.
static void error(java.lang.Throwable ex, java.lang.String msg)
          Logs an exception to the unidu.error logger.
static org.apache.log4j.Logger getLogger(java.lang.Class c)
          Returns a logger for the specified class.
static org.apache.log4j.Logger getLogger(java.lang.String name)
          Returns a logger for the specified name.
static void setConfFile(java.io.File file)
          Sets the LOG4J config file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Log

public Log()
Method Detail

getLogger

public static org.apache.log4j.Logger getLogger(java.lang.Class c)
Returns a logger for the specified class.

Parameters:
c - class
Returns:
logger

getLogger

public static org.apache.log4j.Logger getLogger(java.lang.String name)
Returns a logger for the specified name.

Parameters:
name - logger name
Returns:
logger

addConfigFile

public static void addConfigFile(java.net.URL url)
Initialises this class.

This method loads the log4j configuration (if not already done) from conf/log4j.


error

public static void error(java.lang.Throwable ex)
Logs an exception to the unidu.error logger.

Parameters:
ex - exception to be logged

error

public static void error(java.lang.String msg)
Logs a message to the unidu.error logger.

Parameters:
msg - message to be logged

error

public static void error(java.lang.Throwable ex,
                         java.lang.String msg)
Logs an exception to the unidu.error logger.

Parameters:
ex - exception to be logged

setConfFile

public static void setConfFile(java.io.File file)
Sets the LOG4J config file.

Parameters:
file - LOG4J config file