org.xnap.util
Class Debug

java.lang.Object
  extended by org.xnap.util.Debug

public class Debug
extends java.lang.Object

This class acts as a controller for the log4j logging framework.


Constructor Summary
Debug()
           
 
Method Summary
static java.io.File getErrorFile()
          Returns the file that is used to log all uncaught exceptions.
static long getErrorFileSize()
          Returns the size of the error file.
static void init(java.io.File prefsFile, org.apache.log4j.Level level)
          Initializes the debug environment.
static void setErrorFile(java.io.File f)
          Sets the error file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Debug

public Debug()
Method Detail

getErrorFile

public static java.io.File getErrorFile()
Returns the file that is used to log all uncaught exceptions.

See Also:
setErrorFile(File)

getErrorFileSize

public static long getErrorFileSize()
Returns the size of the error file. This might fail on some systems because the length of open files might always be 0.

Returns:
0, if no error file was set; the length, otherwise
See Also:
getErrorFile()

init

public static void init(java.io.File prefsFile,
                        org.apache.log4j.Level level)
Initializes the debug environment. Should be called as early as possible.


setErrorFile

public static void setErrorFile(java.io.File f)
Sets the error file.

See Also:
getErrorFile()


Copyright © 2001-2005 XNap Team. All Rights Reserved.