public class Debug extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DLOG
Parameter for public javacall "java -jar izpack.jar -DLOG" (Class.internal.variable:
(DLOG = "LOG"))
|
static String |
DSTACKTRACE
Parameter for public javacall "java -jar izpack.jar -DSTACKTRACE"
(Class.internal.variable: (DSTACKTRACE = "STACKTRACE"))
|
static String |
DTRACE
Parameter for public javacall "java -jar izpack.jar -DTRACE"
(Class.internal.variable: (DTRACE = "TRACE"))
|
private static BufferedWriter |
fw
internal used File writer
|
static String |
IZPACK_LOGFILE
System.Property Key: IZPACK_LOGFILE = "izpack.logfile"
|
private static boolean |
LOG
internal initial unintialized LOG-flag
|
private static PrintWriter |
logfile
internal used Printfile writer
|
static String |
LOGFILE_EXTENSION
LOGFILE_EXTENSION = ".txt"
|
static String |
LOGFILE_PREFIX
LOGFILE_PREFIX = "IzPack_Logfile_at_"
|
static 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 and Description |
---|
Debug() |
Modifier and Type | Method and Description |
---|---|
private static PrintWriter |
createLogFile()
Creates the logfile to write log-infos into.
|
static void |
error(Object s)
Traces the given object and additional write their status in the LOGFILE.
|
static 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(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 PrintWriter |
setLogFile(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(Object s)
Traces the internal status of the given Object
|
static boolean |
tracing()
Indicates if debug is tracing
|
public static final String DLOG
public static final String DSTACKTRACE
public static final String DTRACE
public static final String IZPACK_LOGFILE
private static boolean TRACE
private static boolean STACKTRACE
private static boolean LOG
public static String LOGFILE_PREFIX
public static String LOGFILE_EXTENSION
public static String LOGFILENAME
private static BufferedWriter fw
private static PrintWriter logfile
public Debug()
public static void trace(Object s)
s
- public static void error(Object s)
s
- public static void log(Object o)
o
- The Object to logprivate static 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 PrintWriter getLogFile()
public static PrintWriter setLogFile(PrintWriter aLogFile)
aLogFile
- The logFile to set. *WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses