com.twelveParsecs.util
Class Logger

java.lang.Object
  extended by com.twelveParsecs.util.Logger

public class Logger
extends java.lang.Object

Implements a simple logging system. Two logging methods are provided, logErr and logMsg. The only difference is in the way the messages are displayed in the log file. This is intentionally a no-frills logging system.

Version:
1.1
Author:
Will Bailey

Field Summary
private static java.lang.String LOG
          Deprecated. Used in an older version of the class in logErr & logMsg methods as a hard-coded path to the log file.
 
Constructor Summary
private Logger()
          Privately overridden constructor.
 
Method Summary
static void logErr(java.lang.String className, java.lang.String methodName, java.lang.String msg)
          Deprecated. Use the logErr method that allows path to log file as an argument. This old version used a hard-coded log file path.
static void logErr(java.lang.String logFile, java.lang.String className, java.lang.String methodName, java.lang.String msg)
          Logs an error message to the log file.
static void logMsg(java.lang.String className, java.lang.String methodName, java.lang.String msg)
          Deprecated. Use the logMsg method that allows path to log file as an argument. This old version used a hard-coded log file path.
static void logMsg(java.lang.String logFile, java.lang.String className, java.lang.String methodName, java.lang.String msg)
          Logs an informational message to the log file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static final java.lang.String LOG
Deprecated. Used in an older version of the class in logErr & logMsg methods as a hard-coded path to the log file.
See Also:
Constant Field Values
Constructor Detail

Logger

private Logger()
Privately overridden constructor. The logging methods are static and an instance of the class is not needed.

Method Detail

logErr

public static void logErr(java.lang.String className,
                          java.lang.String methodName,
                          java.lang.String msg)
Deprecated. Use the logErr method that allows path to log file as an argument. This old version used a hard-coded log file path.

Logs an error message to the log file.

Parameters:
className - The name of the class this error is coming from
methodName - The name of the method this error is coming from
msg - The error message to log

logMsg

public static void logMsg(java.lang.String className,
                          java.lang.String methodName,
                          java.lang.String msg)
Deprecated. Use the logMsg method that allows path to log file as an argument. This old version used a hard-coded log file path.

Logs an informational message to the log file.

Parameters:
className - The name of the class this error is coming from
methodName - The name of the method this error is coming from
msg - The informational message to log

logErr

public static void logErr(java.lang.String logFile,
                          java.lang.String className,
                          java.lang.String methodName,
                          java.lang.String msg)
Logs an error message to the log file.

Parameters:
logFile - The full path to where the log file should be written or appended.
className - The name of the class this error is coming from
methodName - The name of the method this error is coming from
msg - The error message to log

logMsg

public static void logMsg(java.lang.String logFile,
                          java.lang.String className,
                          java.lang.String methodName,
                          java.lang.String msg)
Logs an informational message to the log file.

Parameters:
logFile - The full path to where the log file should be written or appended.
className - The name of the class this error is coming from
methodName - The name of the method this error is coming from
msg - The informational message to log