Java Doc for LogManager.java in  » Workflow-Engines » pegasus-2.1.0 » org » griphyn » cPlanner » common » 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 » Workflow Engines » pegasus 2.1.0 » org.griphyn.cPlanner.common 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.griphyn.cPlanner.common.LogManager

LogManager
public class LogManager (Code)
The logging class that to log messages at different levels. Currently the following levels are supported.

Eventually, each of the level can have a different writer stream underneath.

The messages can be logged at various levels. The various levels of logging with increasing levels of verbosity are displayed in the following table.

Logging LevelDescription
FATAL all fatal error messages are logged in this level.
ERROR all non fatal error messages are logged in this level.
WARNING all warning messages are logged in this level.
INFO all information logging messages are logged in this level.
CONFIG all configuration messages are logged in this level.
DEBUG all debug messages are logged in this level.

author:
   Karan Vahi
author:
   Gaurang Mehta
version:
   $Revision: 158 $



Field Summary
final public static  intCONFIG_MESSAGE_LEVEL
     The level value, to indicate a CONFIG message.
final public static  intDEBUG_MESSAGE_LEVEL
     The level value, to indicate a DEBUG message.
final public static  intERROR_MESSAGE_LEVEL
     The level value, to indicate an ERROR message.
final public static  intFATAL_MESSAGE_LEVEL
     The level value, to indicate a FATAL error message.
final public static  intINFO_MESSAGE_LEVEL
     The level value, to indicate a INFO message.
final public static  intWARNING_MESSAGE_LEVEL
     The level value, to indicate a WARNING error message.


Method Summary
public static  LogManagergetInstance()
     To get a reference to the the object.
public  intgetLevel()
     Returns the debug level.
public  StringgetTimeStamp()
     Gets the timestamp nicely formatted.
public  voidlog(String message, Exception e, int level)
     Logs the exception on the appropriate queue if the level of the message is less than or equal to the level set for the Logger.
public  voidlog(String message, int level)
     Logs the message on the appropriate queue if the level of the message is less than or equal to the level set for the Logger.
public  voidlogCompletion(String message, int level)
     Logs the completion message on the basis of the debug level.
public  voidsetErrorWriter(String out)
     Certains levels like FATAL, ERROR and WARN can be set to log to a different stream, than the default stream used for writing other messages. By default, these messages are logged to stderr. Note: The previous stream is not closed automatically.
Parameters:
  out - is the name of a file to append to.
public  voidsetErrorWriter(OutputStream err)
     Certains levels like FATAL, ERROR and WARN can be set to log to a different stream, than the default stream used for writing other messages.
public  voidsetLevel(Level level)
     Sets the debug level.
public  voidsetLevel(int level)
     Sets the debug level.
public  voidsetLevel(int level, boolean info)
     Sets the debug level.
public  voidsetOutputWriter(String out)
     Sets the writer associated with the class to the one specified for all type of messages other than error messages.
Parameters:
  out - is the name of a file to append to.
public  voidsetOutputWriter(OutputStream out)
     Sets the writer associated with the class to the one specified for all type of messages other than error messages.
public  voidsetWriters(String out)
     Sets both the output writer and the error writer to the same underlying writer.
Parameters:
  out - is the name of a file to append to.
public  voidsetWriters(OutputStream err)
     Sets both the output writer and the error writer to the same underlying writer.

Field Detail
CONFIG_MESSAGE_LEVEL
final public static int CONFIG_MESSAGE_LEVEL(Code)
The level value, to indicate a CONFIG message.



DEBUG_MESSAGE_LEVEL
final public static int DEBUG_MESSAGE_LEVEL(Code)
The level value, to indicate a DEBUG message.



ERROR_MESSAGE_LEVEL
final public static int ERROR_MESSAGE_LEVEL(Code)
The level value, to indicate an ERROR message.



FATAL_MESSAGE_LEVEL
final public static int FATAL_MESSAGE_LEVEL(Code)
The level value, to indicate a FATAL error message.



INFO_MESSAGE_LEVEL
final public static int INFO_MESSAGE_LEVEL(Code)
The level value, to indicate a INFO message.



WARNING_MESSAGE_LEVEL
final public static int WARNING_MESSAGE_LEVEL(Code)
The level value, to indicate a WARNING error message.





Method Detail
getInstance
public static LogManager getInstance()(Code)
To get a reference to the the object. a singleton access to the object.



getLevel
public int getLevel()(Code)
Returns the debug level. the level to which the debug level has been set to.



getTimeStamp
public String getTimeStamp()(Code)
Gets the timestamp nicely formatted. It generates the date-timestamp in extended ISO 8601 format. It generates the timestamp using the local timezone not the UTC. An example of the date-timestamp generated would be 2003-06-06T14:31:27-07:00 where -07:00 denotes the timezone offset of the local timezone from UTC. the formattted timestamp;



log
public void log(String message, Exception e, int level)(Code)
Logs the exception on the appropriate queue if the level of the message is less than or equal to the level set for the Logger. For INFO level message, the boolean indicating that a completion message is to follow is set to true always.
Parameters:
  message - the message to be logged.
Parameters:
  e - the exception to be logged
Parameters:
  level - the level on which the message has to be logged.
See Also:   LogManager.setLevel(int)
See Also:   LogManager.log(String,int)



log
public void log(String message, int level)(Code)
Logs the message on the appropriate queue if the level of the message is less than or equal to the level set for the Logger. For INFO level message, the boolean indicating that a completion message is to follow is set to true always.
Parameters:
  message - the message to be logged.
Parameters:
  level - the level on which the message has to be logged.
See Also:   LogManager.setLevel(int)
See Also:   LogManager.log(String,int,boolean)



logCompletion
public void logCompletion(String message, int level)(Code)
Logs the completion message on the basis of the debug level.
Parameters:
  message - the message to be logged.
Parameters:
  level - the debug level of the start message for whose completionyou want.



setErrorWriter
public void setErrorWriter(String out)(Code)
Certains levels like FATAL, ERROR and WARN can be set to log to a different stream, than the default stream used for writing other messages. By default, these messages are logged to stderr. Note: The previous stream is not closed automatically.
Parameters:
  out - is the name of a file to append to. Special names arestdout and stderr, which map to thesystem's respective streams.
See Also:   LogManager.setErrorWriter(OutputStream)



setErrorWriter
public void setErrorWriter(OutputStream err)(Code)
Certains levels like FATAL, ERROR and WARN can be set to log to a different stream, than the default stream used for writing other messages. By default, these messages are logged to stderr. Note: The previous stream is not closed automatically.
Parameters:
  err - the stream to which error messages are to be logged.



setLevel
public void setLevel(Level level)(Code)
Sets the debug level. All those messages are logged which have a level less than equal to the debug level.
Parameters:
  level - the level to which the debug level needs to be set to.



setLevel
public void setLevel(int level)(Code)
Sets the debug level. All those messages are logged which have a level less than equal to the debug level. In addition the info messages are always logged.
Parameters:
  level - the level to which the debug level needs to be set to.



setLevel
public void setLevel(int level, boolean info)(Code)
Sets the debug level. All those messages are logged which have a level less than equal to the debug level. In case the boolean info is set, all the info messages are also logged.
Parameters:
  level - the level to which the debug level needs to be set to.
Parameters:
  info - boolean denoting whether the INFO messages need to belogged or not.



setOutputWriter
public void setOutputWriter(String out)(Code)
Sets the writer associated with the class to the one specified for all type of messages other than error messages.
Parameters:
  out - is the name of a file to append to. Special names arestdout and stderr, which map to thesystem's respective streams.
See Also:   LogManager.setOutputWriter(OutputStream)



setOutputWriter
public void setOutputWriter(OutputStream out)(Code)
Sets the writer associated with the class to the one specified for all type of messages other than error messages. By default it is System.out.
Parameters:
  out - the stream to which the messages are logged.
See Also:   LogManager.setErrorWriter(OutputStream)



setWriters
public void setWriters(String out)(Code)
Sets both the output writer and the error writer to the same underlying writer.
Parameters:
  out - is the name of a file to append to. Special names arestdout and stderr, which map to thesystem's respective streams.
See Also:   LogManager.setWriters(OutputStream)



setWriters
public void setWriters(OutputStream err)(Code)
Sets both the output writer and the error writer to the same underlying writer. Note: The previous stream is not closed automatically.
Parameters:
  err - the stream to which error messages are to be logged.



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.