| |
|
| java.lang.Object com.izforge.izpack.util.Debug
Debug | public class Debug (Code) | | 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:
- Debug.trace( aCriticalObject )
- - to print the status on console
- Debug.error( aCriticalObject )
- - to print the status on console and
print the stacktrace of a supressed Exception.
- Additionally:
- if -DLOG is given the output will be written in the File see #LOGFILENAME in the users Home
directory.
author: Julien Ponge, Klaus Bartz, Marc Eppelmann version: $Revision: 2036 $ ($Id: Debug.java 2036 2008-02-09 11:14:05Z jponge $) |
DLOG | final public static String DLOG(Code) | | Parameter for public javacall "java -jar izpack.jar -DLOG" (Class.internal.variable: (DLOG =
"LOG"))
|
DSTACKTRACE | final public static String DSTACKTRACE(Code) | | Parameter for public javacall "java -jar izpack.jar -DSTACKTRACE" (Class.internal.variable:
(DSTACKTRACE = "STACKTRACE"))
|
DTRACE | final public static String DTRACE(Code) | | Parameter for public javacall "java -jar izpack.jar -DTRACE" (Class.internal.variable:
(DTRACE = "TRACE"))
|
IZPACK_LOGFILE | final public static String IZPACK_LOGFILE(Code) | | System.Property Key: IZPACK_LOGFILE = "izpack.logfile"
|
LOGFILENAME | public static String LOGFILENAME(Code) | | LOGFILENAME = LOGFILE_PREFIX + System.currentTimeMillis() + LOGFILE_EXTENSION
|
LOGFILE_EXTENSION | public static String LOGFILE_EXTENSION(Code) | | LOGFILE_EXTENSION = ".txt"
|
LOGFILE_PREFIX | public static String LOGFILE_PREFIX(Code) | | LOGFILE_PREFIX = "IzPack_Logfile_at_"
|
LOG_WITHOUT_DATE | final public static int LOG_WITHOUT_DATE(Code) | | LOG_WITHOUT_DATE = 0
|
LOG_WITH_DATE | final public static int LOG_WITH_DATE(Code) | | LOG_WITH_DATE = 1
|
LOG_WITH_TIME_AND_DATE | final public static int LOG_WITH_TIME_AND_DATE(Code) | | LOG_WITH_TIME_AND_DATE= LOG_WITH_DATE | LOG_WITH_TIME_STAMP = 3
|
LOG_WITH_TIME_STAMP | final public static int LOG_WITH_TIME_STAMP(Code) | | LOG_WITH_TIME_STAMP = 2
|
error | public static void error(Object s)(Code) | | Traces the given object and additional write their status in the LOGFILE.
Parameters: s - |
getLogFile | public static PrintWriter getLogFile()(Code) | | Get the Logfile
Returns the logFile. |
isLOG | public static boolean isLOG()(Code) | | Returns the LOG flag.
Returns the LOG flag. |
isSTACKTRACE | public static boolean isSTACKTRACE()(Code) | | Returns the current STACKTRACE flag
Returns the STACKTRACE. |
isTRACE | public static boolean isTRACE()(Code) | | Gets the current TRACE flag
Returns the TRACE. |
log | public static void log(Object o)(Code) | | Logs the given Object in the created Logfile if -DLOG=true was given on commandline i.e: java
-DLOG=true -jar izpack-installer.jar
Parameters: o - The Object to log, can be also an exception. |
log | public static void log(Object o, int withWhatFormat)(Code) | | Logs the given Object in the created Logfile if -DLOG=true was given on commandline i.e: java
-DLOG=true -jar izpack-installer.jar
Parameters: o - The Object to log Parameters: withWhatFormat - if the given MASK is greater than 0, Log with Date/Timestamp |
setLOG | public static void setLOG(boolean aFlag)(Code) | | Sets The LOG like the given value
Parameters: aFlag - The LOG status to set to or not. |
setLogFile | public static synchronized PrintWriter setLogFile(PrintWriter aLogFile)(Code) | | Sets the Logfile
Parameters: aLogFile - The logFile to set. * The logfile to write into |
setSTACKTRACE | public static void setSTACKTRACE(boolean aFlag)(Code) | | Sets the STACKTRACE like the given value
Parameters: aFlag - The STACKTRACE to set / unset. |
setTRACE | public static void setTRACE(boolean aFlag)(Code) | | Sets the TRACE flag like the given value
Parameters: aFlag - The TRACE to set / unset. |
stackTracing | public static boolean stackTracing()(Code) | | Indicates if debug is stacktracing
true if stacktracing otherwise false |
trace | public static void trace(Object s)(Code) | | Traces the internal status of the given Object
Parameters: s - |
tracing | public static boolean tracing()(Code) | | Indicates if debug is tracing
true if tracing otherwise false |
|
|
|