Version: 1.1.1

org.biomoby.registry.rdfagent.util
Class Log

java.lang.Object
  extended by org.biomoby.registry.rdfagent.util.Log

public class Log
extends Object

A logging class for the agent.

Author:
Edward Kawas

Field Summary
static Level ALL
          log all messages
static Level INFO
          log only info messages
static Level SEVERE
          log severe messages
static Level WARN
          log warning messages
 
Constructor Summary
Log()
           
 
Method Summary
static void exception(String cls, String method, Throwable t)
           
static void info(String msg)
           
static boolean isLoggable()
           
static void setEnabled(boolean enabled)
           
static void severe(String msg)
           
static void start(String logPath, Level level, boolean enable, String msg)
           
static void stop(String msg)
          A method to stop logging.
static void warning(String msg)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL

public static final Level ALL
log all messages


INFO

public static final Level INFO
log only info messages


WARN

public static final Level WARN
log warning messages


SEVERE

public static final Level SEVERE
log severe messages

Constructor Detail

Log

public Log()
Method Detail

start

public static void start(String logPath,
                         Level level,
                         boolean enable,
                         String msg)
Parameters:
logPath - the directory to place the log file
level - the level of loggin that you would like have.
msg - the message to log upon starting

stop

public static void stop(String msg)
A method to stop logging.

Parameters:
msg - a message to output

warning

public static void warning(String msg)
Parameters:
msg - the string that you would like to log as a warning

info

public static void info(String msg)
Parameters:
msg - the string that you would like to log as info

severe

public static void severe(String msg)
Parameters:
msg - the string that you would like to log as severe

exception

public static void exception(String cls,
                             String method,
                             Throwable t)
Parameters:
cls - the class where the exception occured
method - the method that caused the exception
t - the throwable object to log

isLoggable

public static boolean isLoggable()
Returns:
whether or not the the logger can log.

setEnabled

public static void setEnabled(boolean enabled)
Parameters:
enabled - if true, then logging is set to enabled, otherwise it is not

Version: 1.1.1

Submit a bug or feature
Generated: Sat May 29 04:26:35 EDT 2010