Java Doc for Debug.java in  » Installer » IzPack » com » izforge » izpack » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Installer » IzPack » com.izforge.izpack.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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 $)


Field Summary
final public static  StringDLOG
    
final public static  StringDSTACKTRACE
    
final public static  StringDTRACE
    
final public static  StringIZPACK_LOGFILE
    
public static  StringLOGFILENAME
    
public static  StringLOGFILE_EXTENSION
    
public static  StringLOGFILE_PREFIX
    
final public static  intLOG_WITHOUT_DATE
    
final public static  intLOG_WITH_DATE
    
final public static  intLOG_WITH_TIME_AND_DATE
    
final public static  intLOG_WITH_TIME_STAMP
    


Method Summary
public static  voiderror(Object s)
     Traces the given object and additional write their status in the LOGFILE.
public static  PrintWritergetLogFile()
    
public static  booleanisLOG()
     Returns the LOG flag.
public static  booleanisSTACKTRACE()
    
public static  booleanisTRACE()
    
public static  voidlog(Object o)
    
public static  voidlog(Object o, int withWhatFormat)
    
public static  voidsetLOG(boolean aFlag)
    
public static synchronized  PrintWritersetLogFile(PrintWriter aLogFile)
     Sets the Logfile
Parameters:
  aLogFile - The logFile to set.
public static  voidsetSTACKTRACE(boolean aFlag)
    
public static  voidsetTRACE(boolean aFlag)
    
public static  booleanstackTracing()
    
public static  voidtrace(Object s)
    
public static  booleantracing()
    

Field Detail
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





Method Detail
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



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.