Java Doc for Monolog.java in  » Development » Monolog » org » objectweb » util » monolog » 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 » Development » Monolog » org.objectweb.util.monolog 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.objectweb.util.monolog.Monolog

Monolog
public class Monolog (Code)
This class is a helper to instanciate a logger factory. It provides a set of init(...) method with various parameter: - no parameter => automatic configuration with system property and default values - Properties => contains monolog configuration (loggers, handlers, levels and optionaly the wrapper class name (automatic choice if not specified)). - String => the class name of the wrapper class to instanciate
author:
   S.Chassande-Barrioz


Field Summary
final public static  StringDEFAULT_MONOLOG_FILE
     is the default monolog configuration file lookup from the file system or from the classpath.
final public static  StringJDK_WRAPPER_CLASS_NAME
     is the class name of logger factory for the java.util.logging logging system.
final public static  StringLOG4JMini_WRAPPER_CLASS_NAME
     is the class name of logger factory for the log4jME logging system.
final public static  StringLOG4J_WRAPPER_CLASS_NAME
     is the class name of logger factory for the log4j logging system.
final public static  StringMONOLOG_CLASS_NAME
     is the property name of the wrapper class name.
final public static  StringMONOLOG_FILE_NAME
     is the property name of the monolog configuration file.
public static  booleandebug
     Inidicates if the monolog wrapper must be logged itself.
public static  LoggerFactoryloggerFactory
    
public static  MonologFactorymonologFactory
     is the last required logger factory.


Method Summary
public static  voiddebug(String m)
     This method must be only used to debug the Monolog wrappers.
public static  voiderror(String m, Exception e)
    
public static  MonologFactorygetDefaultMonologFactory()
    
public static  HandlerFactorygetHandlerFactory(String className)
    
public static  LevelFactorygetLevelFactory(String className)
    
public static  LoggerFactorygetLoggerFactory(String className)
    
public static  MonologFactorygetMonologFactory()
    
public static  MonologFactorygetMonologFactory(String fileName)
     Initializes Monolog with a given monolog configuration file name if the file is found, it delegates the intialization to init(Properties) method.
public static  MonologFactorygetMonologFactory(Properties properties)
     Initializes monolog in with a Properties instance. It searches from the properties the logger factory class name ( MONOLOG_CLASS_NAME property) and it delegates its configuration to the loadMonologConfiguration(Properties, LoggerFactory) method.
Parameters:
  properties - can contains the MONOLOG_CLASS_NAME property and therest of the monolog configuration (loggers, handlers, levels).
public static  LoggerFactoryinit()
    
public static  LoggerFactoryinit(String fileName)
    
public static  LoggerFactoryinit(Properties properties)
    
public static  MonologFactoryinitialize()
     Initializes Monolog.
public static  MonologFactoryinstanciateMonologFactory(String className)
     Retrieves a MonologFactory instance. First it tries to instanciate the given logger factory class name. If it is not possible it tries to instanciate the logger factory of the log4j system (if the classes are availlable). If log4j or its wrapper are not reachable then it tries to instanciate the wrapper of the log4jME logging system. If log4jME or its wrapper are not reachable then it tries to instanciate the wrapper of the java.util.logging logging system. Finally if any of these wrappers are reachable the basic logger factory is used.
Parameters:
  className - is the class name of a LoggerFactory implementation.It can be a null value.
public static  voidloadMonologConfiguration(Properties properties)
     Loads a monolog configuration into the loggerFactory.
public static  voidloadMonologConfiguration(Properties properties, MonologFactory mf)
     Loads a monolog configuration into an existing MonologFactory.
public static  voidloadMonologConfiguration(Properties properties, LoggerFactory lf)
    

Field Detail
DEFAULT_MONOLOG_FILE
final public static String DEFAULT_MONOLOG_FILE(Code)
is the default monolog configuration file lookup from the file system or from the classpath.



JDK_WRAPPER_CLASS_NAME
final public static String JDK_WRAPPER_CLASS_NAME(Code)
is the class name of logger factory for the java.util.logging logging system.



LOG4JMini_WRAPPER_CLASS_NAME
final public static String LOG4JMini_WRAPPER_CLASS_NAME(Code)
is the class name of logger factory for the log4jME logging system.



LOG4J_WRAPPER_CLASS_NAME
final public static String LOG4J_WRAPPER_CLASS_NAME(Code)
is the class name of logger factory for the log4j logging system.



MONOLOG_CLASS_NAME
final public static String MONOLOG_CLASS_NAME(Code)
is the property name of the wrapper class name. This property is searched from the specified properties or from the system properties.



MONOLOG_FILE_NAME
final public static String MONOLOG_FILE_NAME(Code)
is the property name of the monolog configuration file. This property is searched from the specified properties or from the system properties.



debug
public static boolean debug(Code)
Inidicates if the monolog wrapper must be logged itself.



loggerFactory
public static LoggerFactory loggerFactory(Code)



monologFactory
public static MonologFactory monologFactory(Code)
is the last required logger factory. By default it is initialized to the a basic logger factory implementation (LoggerImpl).





Method Detail
debug
public static void debug(String m)(Code)
This method must be only used to debug the Monolog wrappers. To active the log of monolog assign the "true" value to the system property "monolog.debug".
Parameters:
  m - the message to log.



error
public static void error(String m, Exception e)(Code)



getDefaultMonologFactory
public static MonologFactory getDefaultMonologFactory()(Code)



getHandlerFactory
public static HandlerFactory getHandlerFactory(String className)(Code)



getLevelFactory
public static LevelFactory getLevelFactory(String className)(Code)



getLoggerFactory
public static LoggerFactory getLoggerFactory(String className)(Code)



getMonologFactory
public static MonologFactory getMonologFactory()(Code)



getMonologFactory
public static MonologFactory getMonologFactory(String fileName)(Code)
Initializes Monolog with a given monolog configuration file name if the file is found, it delegates the intialization to init(Properties) method. if the file is not found it delegates the logger factory instanciation to the getLoggerFactory(String) method.
Parameters:
  fileName - is the file name of a properties reachable from thefile system or the classpath. the loggerFactory (never null)



getMonologFactory
public static MonologFactory getMonologFactory(Properties properties)(Code)
Initializes monolog in with a Properties instance. It searches from the properties the logger factory class name ( MONOLOG_CLASS_NAME property) and it delegates its configuration to the loadMonologConfiguration(Properties, LoggerFactory) method.
Parameters:
  properties - can contains the MONOLOG_CLASS_NAME property and therest of the monolog configuration (loggers, handlers, levels). the loggerFactory (never null)



init
public static LoggerFactory init()(Code)



init
public static LoggerFactory init(String fileName)(Code)



init
public static LoggerFactory init(Properties properties)(Code)



initialize
public static MonologFactory initialize()(Code)
Initializes Monolog. It searches in system properties a monolog configuration file (MONOLOG_FILE_NAME system property) or use the default file name (DEFAULT_MONOLOG_FILE system property). the loggerFactory (never null)



instanciateMonologFactory
public static MonologFactory instanciateMonologFactory(String className)(Code)
Retrieves a MonologFactory instance. First it tries to instanciate the given logger factory class name. If it is not possible it tries to instanciate the logger factory of the log4j system (if the classes are availlable). If log4j or its wrapper are not reachable then it tries to instanciate the wrapper of the log4jME logging system. If log4jME or its wrapper are not reachable then it tries to instanciate the wrapper of the java.util.logging logging system. Finally if any of these wrappers are reachable the basic logger factory is used.
Parameters:
  className - is the class name of a LoggerFactory implementation.It can be a null value. a LoggerFactory instance (never null).



loadMonologConfiguration
public static void loadMonologConfiguration(Properties properties)(Code)
Loads a monolog configuration into the loggerFactory.
Parameters:
  properties - contains the properties to load into the given loggerfactory.



loadMonologConfiguration
public static void loadMonologConfiguration(Properties properties, MonologFactory mf)(Code)
Loads a monolog configuration into an existing MonologFactory.
Parameters:
  properties - contains the properties to load into the given loggerfactory.
Parameters:
  mf - is the MonologFactory to configure.



loadMonologConfiguration
public static void loadMonologConfiguration(Properties properties, LoggerFactory lf)(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.