|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.izforge.izpack.util.Debug
This class is for debug purposes. It is highly recommended to use it on critical or
experimental code places. To enable the debug mode of IzPack, just start the
installer with the java parameter -DTRACE=true or -DSTACKTRACE=true to enable
extendend output of the internal status of critical objects.
How to use it as IzPack Setup Developer:
Just import this class and use one of the methods:
Field Summary | |
static java.lang.String |
DLOG
Parameter for public javacall "java -jar izpack.jar -DLOG" (Class.internal.variable: (DLOG = "LOG")) |
static java.lang.String |
DSTACKTRACE
Parameter for public javacall "java -jar izpack.jar -DSTACKTRACE" (Class.internal.variable: (DSTACKTRACE = "STACKTRACE")) |
static java.lang.String |
DTRACE
Parameter for public javacall "java -jar izpack.jar -DTRACE" (Class.internal.variable: (DTRACE = "TRACE")) |
private static java.io.BufferedWriter |
fw
internal used File writer |
static java.lang.String |
IZPACK_LOGFILE
System.Property Key: IZPACK_LOGFILE = "izpack.logfile" |
private static boolean |
LOG
internal initial unintialized LOG-flag |
private static java.io.PrintWriter |
logfile
internal used Printfile writer |
static java.lang.String |
LOGFILE_EXTENSION
LOGFILE_EXTENSION = ".txt" |
static java.lang.String |
LOGFILE_PREFIX
LOGFILE_PREFIX = "IzPack_Logfile_at_" |
static java.lang.String |
LOGFILENAME
LOGFILENAME = LOGFILE_PREFIX + System.currentTimeMillis() + LOGFILE_EXTENSION |
private static boolean |
STACKTRACE
internal initial unintialized STACKTRACE-flag |
private static boolean |
TRACE
internally initial unintialized TRACE-flag |
Constructor Summary | |
Debug()
|
Method Summary | |
private static java.io.PrintWriter |
createLogFile()
Creates the logfile to write log-infos into. |
static void |
error(java.lang.Object s)
Traces the given object and additional write their status in the LOGFILE. |
static java.io.PrintWriter |
getLogFile()
Get the Logfile |
static boolean |
isLOG()
Returns the LOG flag. |
static boolean |
isSTACKTRACE()
Returns the current STACKTRACE flag |
static boolean |
isTRACE()
Gets the current TRACE flag |
static void |
log(java.lang.Object o)
Logs the given Object in the created Logfile if -DLOG=true was given on commandline i.e: java -DLOG=true -jar izpack-installer.jar |
static void |
setLOG(boolean aFlag)
Sets The LOG like the given value |
static java.io.PrintWriter |
setLogFile(java.io.PrintWriter aLogFile)
Sets the Logfile |
static void |
setSTACKTRACE(boolean aFlag)
Sets the STACKTRACE like the given value |
static void |
setTRACE(boolean aFlag)
Sets the TRACE flag like the given value |
static boolean |
stackTracing()
Indicates if debug is stacktracing |
static void |
trace(java.lang.Object s)
Traces the internal status of the given Object |
static boolean |
tracing()
Indicates if debug is tracing |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String DLOG
public static final java.lang.String DSTACKTRACE
public static final java.lang.String DTRACE
public static final java.lang.String IZPACK_LOGFILE
private static boolean TRACE
private static boolean STACKTRACE
private static boolean LOG
public static java.lang.String LOGFILE_PREFIX
public static java.lang.String LOGFILE_EXTENSION
public static java.lang.String LOGFILENAME
private static java.io.BufferedWriter fw
private static java.io.PrintWriter logfile
Constructor Detail |
public Debug()
Method Detail |
public static void trace(java.lang.Object s)
s
- public static void error(java.lang.Object s)
s
- public static void log(java.lang.Object o)
o
- The Object to logprivate static java.io.PrintWriter createLogFile()
public static boolean tracing()
public static boolean stackTracing()
public static boolean isLOG()
public static void setLOG(boolean aFlag)
aFlag
- The LOG status to set to or not.public static boolean isSTACKTRACE()
public static void setSTACKTRACE(boolean aFlag)
aFlag
- The STACKTRACE to set / unset.public static boolean isTRACE()
public static void setTRACE(boolean aFlag)
aFlag
- The TRACE to set / unset.public static java.io.PrintWriter getLogFile()
public static java.io.PrintWriter setLogFile(java.io.PrintWriter aLogFile)
aLogFile
- The logFile to set. *
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |