org.deken.game.utils
Class GameLog

java.lang.Object
  extended by org.deken.game.utils.GameLog

public class GameLog
extends java.lang.Object

Title: GameLog

Description: Utility for logging data to the System output or to a file.

Copyright: (c) 2010

Version:
1.0
Author:
Gary Deken

Field Summary
static boolean averageRate
           
static boolean frameRate
           
 
Method Summary
static void log(java.lang.Class cls, java.lang.Exception e)
          Log the exception to a file or console.
static void log(java.lang.Class cls, java.lang.String logText)
          Log the text to a file or console.
static void logFrame(long totalTime, long totalUpdates, long frameTime)
          Logs the seconds game ran, frames per second (FPS) and updates per second (UPS), based if logTime and logFrames is true.
static void setLogFile(java.io.File newLogFile)
          Set the log file location, and enables logging to file, using java Logging.
static void setLogToFile(boolean logToFile)
          Enables logging to the default log file, using java Logging.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

frameRate

public static boolean frameRate

averageRate

public static boolean averageRate
Method Detail

log

public static void log(java.lang.Class cls,
                       java.lang.String logText)
Log the text to a file or console.

Parameters:
cls -
logText - String

log

public static void log(java.lang.Class cls,
                       java.lang.Exception e)
Log the exception to a file or console.

Parameters:
cls -
e -

logFrame

public static void logFrame(long totalTime,
                            long totalUpdates,
                            long frameTime)
Logs the seconds game ran, frames per second (FPS) and updates per second (UPS), based if logTime and logFrames is true.

Parameters:
totalTime -
totalUpdates -
frameTime -

setLogFile

public static void setLogFile(java.io.File newLogFile)
Set the log file location, and enables logging to file, using java Logging.

Parameters:
newLogFile - File

setLogToFile

public static void setLogToFile(boolean logToFile)
Enables logging to the default log file, using java Logging.

Parameters:
logToFile -