verinec.util
Class LogUtil

java.lang.Object
  extended by verinec.util.LogUtil

public class LogUtil
extends Object

Utility class for logging using java.util.logging

Author:
david.buchmann at unifr.ch

Constructor Summary
private LogUtil()
          Only static methods, do not instantiate.
 
Method Summary
static void logException(Throwable t, String classname, String methodname, String info)
          Log an exception into the logger using the throwing() method of java.util.logging.Logger.
static void logJdom(Logger l, Element r)
          Log a jdom xml tree to the logger.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogUtil

private LogUtil()
Only static methods, do not instantiate.

Method Detail

logException

public static void logException(Throwable t,
                                String classname,
                                String methodname,
                                String info)
Log an exception into the logger using the throwing() method of java.util.logging.Logger.

Parameters:
t - The exception to log.
classname - The classname for the logger.
methodname - The methodname for the logger.
info - Additional info to log with the exception.

logJdom

public static void logJdom(Logger l,
                           Element r)
Log a jdom xml tree to the logger. Because this is considered debug info, we only log if level is

Parameters:
l - The logger object to log to.
r - The element to log with all children.

Copyright © 2005 Verinec, DIUF