edu.wpi.ebob
Class ObjBenchLogger

java.lang.Object
  extended by edu.wpi.ebob.ObjBenchLogger

public class ObjBenchLogger
extends java.lang.Object

A convenience logger for the Object Bench.

Author:
Liam Morley

Constructor Summary
ObjBenchLogger()
           
 
Method Summary
static org.eclipse.core.runtime.IStatus createStatus(int severity, int code, java.lang.String message, java.lang.Throwable exception)
          Create a status object representing the specified information.
static void log(int severity, int code, java.lang.String message, java.lang.Throwable exception)
          Log the specified information.
static void log(org.eclipse.core.runtime.IStatus status)
          Log the given status.
static void logError(java.lang.String message, java.lang.Throwable exception)
          Log the specified error.
static void logError(java.lang.Throwable exception)
          Log the specified error.
static void logInfo(java.lang.String message)
          Log the specified information.
static void logWarning(java.lang.String message)
          Log the specified warning.
static void logWarning(java.lang.String message, java.lang.Throwable exception)
          Log the specified warning.
static void logWarning(java.lang.Throwable exception)
          Log the specified warning.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjBenchLogger

public ObjBenchLogger()
Method Detail

createStatus

public static org.eclipse.core.runtime.IStatus createStatus(int severity,
                                                            int code,
                                                            java.lang.String message,
                                                            java.lang.Throwable exception)
Create a status object representing the specified information.

Parameters:
severity - the severity; one of the following: IStatus.OK, IStatus.ERROR,IStatus.INFO, or IStatus.WARNING.
code - the plug-in-specific status code, or OK.
message - a human-readable message, localized to the current locale.
exception - a low-level exception, or null if not applicable.
Returns:
the status object (not null).

log

public static void log(int severity,
                       int code,
                       java.lang.String message,
                       java.lang.Throwable exception)
Log the specified information.

Parameters:
severity - the severity; one of the following: IStatus.OK, IStatus.ERROR,IStatus.INFO, or IStatus.WARNING.
code - the plug-in-specific status code, or OK.
message - a human-readable message, localized to the current locale.
exception - a low-level exception, or null if not applicable.

log

public static void log(org.eclipse.core.runtime.IStatus status)
Log the given status.

Parameters:
status - the status to log.

logError

public static void logError(java.lang.String message,
                            java.lang.Throwable exception)
Log the specified error.

Parameters:
message - a human-readable message, localized to the current locale.
exception - a low-level exception, or null if not applicable.

logError

public static void logError(java.lang.Throwable exception)
Log the specified error.

Parameters:
exception - a low-level exception.

logInfo

public static void logInfo(java.lang.String message)
Log the specified information.

Parameters:
message - a human-readable message, localized to the current locale.

logWarning

public static void logWarning(java.lang.String message)
Log the specified warning. Passes along a null exception.

Parameters:
message - a human-readable message, localized to the current locale.

logWarning

public static void logWarning(java.lang.String message,
                              java.lang.Throwable exception)
Log the specified warning.

Parameters:
message - a human-readable message, localized to the current locale.
exception - a low-level exception, or null if not applicable.

logWarning

public static void logWarning(java.lang.Throwable exception)
Log the specified warning.

Parameters:
exception - a low-level exception.