com.valhalla
Class Logger

java.lang.Object
  extended bycom.valhalla.Logger

public class Logger
extends java.lang.Object

Class used for logging/debugging

Version:
1.0
Author:
Adam Olsen

Constructor Summary
Logger()
           
 
Method Summary
static void closeLog()
          Closes the log file if it's open
static void debug(java.lang.String message)
          Outputs to the console only if the "debug" system property is set.
static void logException(java.lang.Exception ex)
          Logs an exceptions stack trace if the log file is open
static void setLogFile(java.lang.String file)
          Sets the log file.
static void write(java.lang.String message)
          Output to the console - include the date and time
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Logger

public Logger()
Method Detail

setLogFile

public static void setLogFile(java.lang.String file)
Sets the log file. If no log file is set, it will not be written to

Parameters:
file - the log file location

logException

public static void logException(java.lang.Exception ex)
Logs an exceptions stack trace if the log file is open

Parameters:
ex - the exception

closeLog

public static void closeLog()
Closes the log file if it's open


debug

public static void debug(java.lang.String message)
Outputs to the console only if the "debug" system property is set.

Parameters:
message - The message to output to the console

write

public static void write(java.lang.String message)
Output to the console - include the date and time

Parameters:
message - The message to output to the console