Java Doc for GenericDebugLogger.java in  » GIS » openjump » de » fho » jump » pirol » utilities » debugOutput » 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 » GIS » openjump » de.fho.jump.pirol.utilities.debugOutput 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   de.fho.jump.pirol.utilities.debugOutput.GenericDebugLogger

GenericDebugLogger
final public class GenericDebugLogger (Code)
Class to handle debugging outputs. It is a singleton and keeps track of local debug settings and personal log levels. Configuration changes should not be done at runtime, but in the properties file ("debugging.properties") in the "[HOME]/.OpenJump_PIROL/config" directory. This file will be created when the logger is used the first time and filled with default values. For information on these values, please see commenting in the java source code.
author:
   Ole Rahn, Stefan Ostermann
author:
  

author:
  
FH Osnabrück - University of Applied Sciences Osnabrück,
author:
  
Project: PIROL (2005),
author:
  
Subproject: Daten- und Wissensmanagement
version:
   $Rev: 856 $
See Also:   de.fhOsnabrueck.jump.pirol.PirolPlugInSettings
See Also:   PersonalLogger


Field Summary
final protected static  StringKEY_ECLIPSEFRIENDLYOUTPUT
    
final protected static  StringKEY_LOGLEVEL
    
final protected static  StringKEY_PRINTFILEANDLINE
    
final protected static  StringKEY_PRINTNEWLINEFIRST
    
final protected static  StringKEY_PRINTSHORTCLASSNAMES
    
final protected static  StringKEY_PRINTTIMESTAMPS
    
final protected static  StringKEY_PRINTUSERNAMES
    
final protected static  StringKEY_USELOGFILE
    
final public static  intSEVERITY_DEBUG
     Constant GenericDebugLogger.logLevel for debugging purposes.
final public static  intSEVERITY_ERROR
     Constant GenericDebugLogger.logLevel for an error that may invalidate the current results occured.
final public static  intSEVERITY_MINORERROR
     Constant GenericDebugLogger.logLevel for an error that won't have influence on the results occured.
final public static  intSEVERITY_SEVEREERROR
     Constant GenericDebugLogger.logLevel for an error that may invalidate the current and future results or may crash the VM, etc..
final public static  intSEVERITY_WARNING
     Constant GenericDebugLogger.logLevel for something that might not be good happened.
protected  booleaneclipseFriendlyOutput
     format the output string so that eclipse supports jumping into the correct file and line number when clicking on the output.
protected  FilelogFile
    
protected  intlogLevel
     The logLevel specifies which kinds of messages will be put out.
protected  booleanprintFileAndLine
    
protected  booleanprintNewLineFirst
    
protected  booleanprintShortClassNames
    
protected  booleanprintTimeStamp
    
protected  booleanprintUserNames
    
protected  PropertiesHandlerproperties
    
final protected static  StringpropertiesFile
    
final protected static  String[]severityLevels
    
protected  PrintStreamstdErr
    
protected  PrintStreamstdOut
    
protected  booleanuseLogFile
    


Method Summary
final protected  StringgetCallerString(Throwable t)
    
final static  GenericDebugLoggergetInstance()
    
final public  intgetLogLevel()
    
final public  StringgetPropertiesFile()
    
final public  booleanisPrintFileAndLine()
    
final public  booleanisPrintNewLineFirst()
    
final public  booleanisPrintTimeStamp()
    
final protected  voidloadProperties()
     load local configuration file, to check if there are saved directorties for debugging outputs.
final protected  voidprintDebug(String user, String message)
    
final protected  voidprintError(String user, String message)
    
final protected  voidprintMessage(String user, int severity, String message)
    
final protected  voidprintMinorError(String user, String message)
    
final protected  voidprintSevereError(String user, String message)
    
final protected  voidprintWarning(String user, String message)
    
final public  voidsetErrorStream(PrintStream err)
     Set the stream, where messages with a loglevel >= SEVERITY_MINORERROR are put out.
final public  voidsetLogLevel(int logLevel)
    
final public  voidsetOutputStream(PrintStream out)
     Set the stream, where messages with a loglevel < SEVERITY_MINORERROR are put out.
final protected  booleanshowMessagesOfUser(String user)
    

Field Detail
KEY_ECLIPSEFRIENDLYOUTPUT
final protected static String KEY_ECLIPSEFRIENDLYOUTPUT(Code)



KEY_LOGLEVEL
final protected static String KEY_LOGLEVEL(Code)



KEY_PRINTFILEANDLINE
final protected static String KEY_PRINTFILEANDLINE(Code)



KEY_PRINTNEWLINEFIRST
final protected static String KEY_PRINTNEWLINEFIRST(Code)



KEY_PRINTSHORTCLASSNAMES
final protected static String KEY_PRINTSHORTCLASSNAMES(Code)



KEY_PRINTTIMESTAMPS
final protected static String KEY_PRINTTIMESTAMPS(Code)



KEY_PRINTUSERNAMES
final protected static String KEY_PRINTUSERNAMES(Code)



KEY_USELOGFILE
final protected static String KEY_USELOGFILE(Code)



SEVERITY_DEBUG
final public static int SEVERITY_DEBUG(Code)
Constant GenericDebugLogger.logLevel for debugging purposes.



SEVERITY_ERROR
final public static int SEVERITY_ERROR(Code)
Constant GenericDebugLogger.logLevel for an error that may invalidate the current results occured.



SEVERITY_MINORERROR
final public static int SEVERITY_MINORERROR(Code)
Constant GenericDebugLogger.logLevel for an error that won't have influence on the results occured.



SEVERITY_SEVEREERROR
final public static int SEVERITY_SEVEREERROR(Code)
Constant GenericDebugLogger.logLevel for an error that may invalidate the current and future results or may crash the VM, etc..



SEVERITY_WARNING
final public static int SEVERITY_WARNING(Code)
Constant GenericDebugLogger.logLevel for something that might not be good happened.



eclipseFriendlyOutput
protected boolean eclipseFriendlyOutput(Code)
format the output string so that eclipse supports jumping into the correct file and line number when clicking on the output.



logFile
protected File logFile(Code)



logLevel
protected int logLevel(Code)
The logLevel specifies which kinds of messages will be put out. A message will be put out, if its severity is greater or equal to the log level (or if the user's log messages are enabled)
 logLevel severity sheme:
 0  - debug   		- just an output for debugging purposes
 1  - warning 		- something that might not be good happened
 2  - minor error 	- an error that won't have influence on the results occured
 3  - error       	- an error that may invalidate the current results occured
 4  - severe error	- an error that may invalidate the current and future results or may crash the VM, etc. 
 



printFileAndLine
protected boolean printFileAndLine(Code)
wether or not to print file name and line number in code



printNewLineFirst
protected boolean printNewLineFirst(Code)
print additional line break before output of new messages?



printShortClassNames
protected boolean printShortClassNames(Code)
print short class names instead of class name plus the whole package path?



printTimeStamp
protected boolean printTimeStamp(Code)
wether or not to print time stamps in the messages



printUserNames
protected boolean printUserNames(Code)
print user names with every message?



properties
protected PropertiesHandler properties(Code)



propertiesFile
final protected static String propertiesFile(Code)



severityLevels
final protected static String[] severityLevels(Code)



stdErr
protected PrintStream stdErr(Code)



stdOut
protected PrintStream stdOut(Code)



useLogFile
protected boolean useLogFile(Code)
use a log file instead of printing messages to the console?





Method Detail
getCallerString
final protected String getCallerString(Throwable t)(Code)



getInstance
final static GenericDebugLogger getInstance()(Code)
THE method to get an instance of this class the logger



getLogLevel
final public int getLogLevel()(Code)
current log level



getPropertiesFile
final public String getPropertiesFile()(Code)
File name of the file where logger configuration is stored



isPrintFileAndLine
final public boolean isPrintFileAndLine()(Code)
true or false //TODO specify the return value



isPrintNewLineFirst
final public boolean isPrintNewLineFirst()(Code)
true or false //TODO specify the return value



isPrintTimeStamp
final public boolean isPrintTimeStamp()(Code)
true or false //TODO specify the return value



loadProperties
final protected void loadProperties() throws IOException(Code)
load local configuration file, to check if there are saved directorties for debugging outputs.
throws:
  IOException - if the file with the given file name could not be accessed



printDebug
final protected void printDebug(String user, String message)(Code)



printError
final protected void printError(String user, String message)(Code)



printMessage
final protected void printMessage(String user, int severity, String message)(Code)



printMinorError
final protected void printMinorError(String user, String message)(Code)



printSevereError
final protected void printSevereError(String user, String message)(Code)



printWarning
final protected void printWarning(String user, String message)(Code)



setErrorStream
final public void setErrorStream(PrintStream err)(Code)
Set the stream, where messages with a loglevel >= SEVERITY_MINORERROR are put out.
Parameters:
  err - stream for debugging output



setLogLevel
final public void setLogLevel(int logLevel)(Code)

Parameters:
  logLevel -



setOutputStream
final public void setOutputStream(PrintStream out)(Code)
Set the stream, where messages with a loglevel < SEVERITY_MINORERROR are put out.
Parameters:
  out - stream for debugging output



showMessagesOfUser
final protected boolean showMessagesOfUser(String user)(Code)
check if the properties contain information on how to treat messages from this user
Parameters:
  user - user id to check true, if Properties contain information on this user that allow posting his/her messages



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.