Java Doc for Logger.java in  » Database-ORM » MMBase » org » mmbase » util » 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 ORM » MMBase » org.mmbase.util.logging 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.mmbase.util.logging.Logger

All known Subclasses:   org.mmbase.util.logging.AbstractSimpleImpl,  org.mmbase.util.logging.SimpleImpl,  org.mmbase.util.logging.LoggerWrapper,  org.mmbase.util.logging.ExceptionImpl,  org.mmbase.util.logging.SimpleTimeStampImpl,  org.mmbase.util.logging.log4j.Log4jImpl,  org.mmbase.util.logging.java.Impl,
Logger
public interface Logger (Code)
The `Logger' interface for MMBase. It was designed for use with Log4j, but it is of course easy to implement it differently as well.

Implementations should also supply a getLoggerInstance static method, and can supply a configure static method.

For example:
 
 import org.mmbase.util.logging.Logging;
 import org.mmbase.util.logging.Logger;
 public class Foo {
 static Logger log = Logging.getLoggerInstance(Foo.class.getName());
 public void bar() {
 ...
 log.info("Hello world!");
 ...
 if(log.isDebugEnabled()) {
 log.debug("Oops, that's not quite right!");
 }
 ...
 }
 }
 
 


author:
   Michiel Meeuwissen




Method Summary
 voiddebug(Object m)
     Logs the message m with debug priority.
 voiddebug(Object m, Throwable t)
    
 voiderror(Object m)
     Logs the message m with error priority.
 voiderror(Object m, Throwable t)
    
 voidfatal(Object m)
     Logs the message m with fatal priority.
 voidfatal(Object m, Throwable t)
    
 voidinfo(Object m)
     Logs the message m with info priority.
 voidinfo(Object m, Throwable t)
    
public  booleanisDebugEnabled()
     Returns true if for this category (Logger), a call to debug (or trace) would do something.
public  booleanisServiceEnabled()
     Returns true if for this category (Logger), a call to service (or debug or trace) would do something.
public  booleanisTraceEnabled()
     Returns true if for this category (Logger), a call to trace would do something.
 voidservice(Object m)
     Logs the message m with service priority.
 voidservice(Object m, Throwable t)
    
public  voidsetLevel(Level p)
     If you want to override the level in the configuration file fixed for this category, you can do it with this method.
 voidtrace(Object m)
     Logs the message m with trace priority.
 voidtrace(Object m, Throwable t)
    
 voidwarn(Object m)
     Logs the message m with warn priority.
 voidwarn(Object m, Throwable t)
    



Method Detail
debug
void debug(Object m)(Code)
Logs the message m with debug priority. Everything a non-developer never wants to see, but you do, to * keep track of what is happening. There can be a lot of them in the code, so it is important that you well protect them with `isDebugEnabled's, to minimize overhead.



debug
void debug(Object m, Throwable t)(Code)

since:
   MMBase-1.8



error
void error(Object m)(Code)
Logs the message m with error priority. Something is definitely wrong. An inconsistency was detected. It might be unpredictable what will happen.



error
void error(Object m, Throwable t)(Code)

since:
   MMBase-1.8



fatal
void fatal(Object m)(Code)
Logs the message m with fatal priority. The progam could not function any more. Normally, you would throw an exception, which then will be logged with fatal priority. I've made an arangement in `Logger' that logs uncatched exceptions with fatal priority, but nevertheless it's better to always catch all exceptions in a more regulated way.



fatal
void fatal(Object m, Throwable t)(Code)

since:
   MMBase-1.8



info
void info(Object m)(Code)
Logs the message m with info priority. As `service', but focussed on things system administrators are usually most interested in, like authorisation issues. For example changes on the database could be logged, such that one can see in the logs what happened.



info
void info(Object m, Throwable t)(Code)

since:
   MMBase-1.8



isDebugEnabled
public boolean isDebugEnabled()(Code)
Returns true if for this category (Logger), a call to debug (or trace) would do something.



isServiceEnabled
public boolean isServiceEnabled()(Code)
Returns true if for this category (Logger), a call to service (or debug or trace) would do something.



isTraceEnabled
public boolean isTraceEnabled()(Code)
Returns true if for this category (Logger), a call to trace would do something.



service
void service(Object m)(Code)
Logs the message m with service priority. An interested system administrator might want to see these things. For examples all queries to the database could be logged with `service' priority. Or if a image is calculated, that could be logged as a `service'. One would get a fairly good idea what MMBase is doing if `service' is switched on.



service
void service(Object m, Throwable t)(Code)

since:
   MMBase-1.8



setLevel
public void setLevel(Level p)(Code)
If you want to override the level in the configuration file fixed for this category, you can do it with this method. This could be usefull for example to switch on all debug logging when something has gone wrong.
Parameters:
  p - The level of the priority. One of the constantsLevel.TRACE, Level.DEBUG, Level.SERVICE, Level.INFO,Level.WARN, Level.ERROR or Level.FATAL.



trace
void trace(Object m)(Code)
Logs the message m with trace priority. For detailled debugging.
See Also:   Logger.debug(Object)



trace
void trace(Object m, Throwable t)(Code)

since:
   MMBase-1.8



warn
void warn(Object m)(Code)
Logs the message m with warn priority. Something strange happened, but it is not necessarily an error.



warn
void warn(Object m, Throwable t)(Code)

since:
   MMBase-1.8



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