Java Doc for Logger.java in  » Database-JDBC-Connection-Pool » octopus » org » webdocwf » util » loader » logging » 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 » Database JDBC Connection Pool » octopus » org.webdocwf.util.loader.logging 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.webdocwf.util.loader.logging.Logger

All known Subclasses:   org.webdocwf.util.loader.logging.StandardLogger,  org.webdocwf.util.loader.logging.Log4jLogger,
Logger
abstract public class Logger (Code)
A general-purpose logging facility. It is modeled after syslogd. This is a base class from which an actual implementation is derived. It only defines how log message are written by a client. Where the log message is written and the mechanism for controlling logging is left up to the implementation. This class does not define any of these mechanism and their definition is not necessary for understand how to use this class.

Each log message is associate with a facility and has a level assigned to it. A facility is a symbolic (String) name that defines a class of log messages. A level is used to indicate the It is expected that the implementation can enable, disable and direct log messages based on these attributes. Facilities and levels are defined symbolicly, with no restriction on the name, and form a tuple. Several standard levels are defined as integer constants and their use is expected to be higher performing than symbolic levels..

Normally, a single, global instance of the object is exists and is obtainable by a static method in this class.

Log messages are written via an object implementing LogChannel. A channel is associated with a single facility, with the level being specified when a message is written. Normally, a LogChannel is obtained once at initialization time and use repeatedly. It is permissible to obtain multiple references to the log channel for a facility, but this is discouraged for performance reasons.

Log messages, even debugging ones, should be defined with care. They should be terse, but clear to someone who isn't intimately familiar with the code. Permanent debugging messages should be designed with the idea of use when supportting a deployed product.

The central logging object needs to be configured very early in the startup process. If logging can't be configured, then the startup should be aborted or a object created that does some simple form of logging, such as write to stderr. A client should never have to check if the global logger object exists.



Field Summary
final public static  intLOGMODE_FULL
     Critical conditions.
final public static  intLOGMODE_NONE
    
final public static  intLOGMODE_NORMAL
     Standard level.
protected static  LoggercentralLogger
     Global Logger object.
public  boolean[]enbledLogLevels
    
final protected static  String[]standardLevelNames
    
final public static  StringstrLOGMODE_FULL
    
final public static  StringstrLOGMODE_NONE
    
final public static  StringstrLOGMODE_NORMAL
    


Method Summary
abstract public  voidclose()
    
abstract public  voidconfigure(String confFilePath)
     Configure Logger with given config file, interpreting of config file is logger implementation specific.
public static  LoggergetCentralLogger()
     Get the central (global) logging object. A reference the object.
abstract public  boolean[]getEnabledLogLevels()
    
abstract public  intgetLevel(String level)
     Convert a symbolic level to an integer identifier.
abstract public  StringgetMessage(String key)
    
abstract public  booleanisEnabled(int level)
     Determine if logging is enabled for the specified level.
abstract public  booleanisEnabled(String level)
     Determine if logging is enabled for the specified level.
abstract public  voidsetEnabledLogLevels(String logMode)
    
abstract public  booleansetMessage(String key, String value)
    
abstract public  voidwrite(int level, String msg)
     Write a string to the log file.
abstract public  voidwrite(String level, String msg)
     Write a string to the log file.
abstract public  voidwrite(int level, String msg, Throwable throwable)
     Write a string and exception to the log file.
abstract public  voidwrite(String level, String msg, Throwable throwable)
     Write a string and exception to the log file.
abstract public  booleanwriteEcho(String strLogTxt)
    

Field Detail
LOGMODE_FULL
final public static int LOGMODE_FULL(Code)
Critical conditions.



LOGMODE_NONE
final public static int LOGMODE_NONE(Code)
A condition that should be corrected immediately



LOGMODE_NORMAL
final public static int LOGMODE_NORMAL(Code)
Standard level.



centralLogger
protected static Logger centralLogger(Code)
Global Logger object.



enbledLogLevels
public boolean[] enbledLogLevels(Code)



standardLevelNames
final protected static String[] standardLevelNames(Code)
Table of standard level names



strLOGMODE_FULL
final public static String strLOGMODE_FULL(Code)



strLOGMODE_NONE
final public static String strLOGMODE_NONE(Code)



strLOGMODE_NORMAL
final public static String strLOGMODE_NORMAL(Code)





Method Detail
close
abstract public void close()(Code)



configure
abstract public void configure(String confFilePath) throws Exception(Code)
Configure Logger with given config file, interpreting of config file is logger implementation specific.
Parameters:
  confFilePath - Path to configuration file.
throws:
  Exception -



getCentralLogger
public static Logger getCentralLogger()(Code)
Get the central (global) logging object. A reference the object. If the facility has not beeninitialized null is returned. However, this isconsidered a bug in the design of the initialization. Clientsdo not need to check for null.



getEnabledLogLevels
abstract public boolean[] getEnabledLogLevels()(Code)



getLevel
abstract public int getLevel(String level)(Code)
Convert a symbolic level to an integer identifier.
Parameters:
  level - Symbolic level to convert The numeric level identifier



getMessage
abstract public String getMessage(String key)(Code)



isEnabled
abstract public boolean isEnabled(int level)(Code)
Determine if logging is enabled for the specified level. This is useful to prevent a series of unnecessary logging calls, as often encountered with debug logging, or a call where generating the message is expensive.
Parameters:
  level - Numeric level that is to be checked. true if enabled, false if notenabled.



isEnabled
abstract public boolean isEnabled(String level)(Code)
Determine if logging is enabled for the specified level. This is useful to prevent a series of unnecessary logging calls, as often encountered with debug logging, or a call where generating the message is expensive.
Parameters:
  level - Symbolic level that is to be checked. true if enabled, false if notenabled.



setEnabledLogLevels
abstract public void setEnabledLogLevels(String logMode)(Code)



setMessage
abstract public boolean setMessage(String key, String value)(Code)



write
abstract public void write(int level, String msg)(Code)
Write a string to the log file.
Parameters:
  level - Numeric level the message is associated with.
Parameters:
  msg - The message to log.



write
abstract public void write(String level, String msg)(Code)
Write a string to the log file.
Parameters:
  level - Symbolic level the message is associated with.
Parameters:
  msg - The message to log.



write
abstract public void write(int level, String msg, Throwable throwable)(Code)
Write a string and exception to the log file.
Parameters:
  level - Numeric level the message is associated with.
Parameters:
  msg - The message to log.
Parameters:
  throwable - Exception or error to log.



write
abstract public void write(String level, String msg, Throwable throwable)(Code)
Write a string and exception to the log file.
Parameters:
  level - Symbolic level the message is associated with.
Parameters:
  msg - The message to log.
Parameters:
  throwable - Exception or error to log.



writeEcho
abstract public boolean writeEcho(String strLogTxt)(Code)



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.