Java Doc for StandardLog.java in  » Development » Javolution » javolution » util » 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 » Javolution » javolution.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javolution.context.LogContext
   javolution.util.StandardLog

StandardLog
public class StandardLog extends LogContext (Code)

This class represents a specialized logging context forwarding events to a standard logger (java.util.logging.Logger).

This class leverages the capabilities of the standard logging facility and extends it to support specialized LogContext logging on a thread or object basis. For example:[code] StandardLog remoteLog = new StandardLog(Logger.getLogger("remote")); StandardLog.enter(remoteLog); try { StandardLog.fine("Current thread uses a remote logger"); ... } finally { StandardLog.exit(remoteLog); // Reverts to previous logging context. }[/code]


author:
   Jean-Marie Dautelle
version:
   5.1, August 1, 2007



Constructor Summary
public  StandardLog()
     Creates a logging context forwarding events to the root logger (Logger.getLogger("")).
public  StandardLog(Logger logger)
     Creates a standard log context forwarding events to the specified logger.

Method Summary
public static  voidconfig(String msg)
     Logs a Level.CONFIG CONFIG message.
public static  voidentering(String sourceClass, String sourceMethod)
     Log a method entry.
public static  voidexiting(String sourceClass, String sourceMethod)
     Log a method return.
public static  voidfine(String msg)
     Logs a Level.FINE FINE message.
public static  voidfiner(String msg)
     Logs a Level.FINER FINER message.
public static  voidfinest(String msg)
     Logs a Level.FINEST FINEST message.
final public  LoggergetLogger()
     Returns the logger to which this context forwards the events to.
public  booleanisErrorLogged()
    
public  booleanisInfoLogged()
    
public static  booleanisLoggable(Level level)
     Checks if a message of the given level would actually be logged by this logger.
public  booleanisWarningLogged()
    
public static  voidlog(LogRecord record)
     Log a specific LogRecord.
public  voidlogError(Throwable error, CharSequence message)
    
public  voidlogInfo(CharSequence message)
    
public  voidlogWarning(CharSequence message)
    
public static  voidsevere(String msg)
     Logs a Level.SEVERE SEVERE message.
public static  voidthrowing(String sourceClass, String sourceMethod, Throwable thrown)
     Logs throwing an exception.


Constructor Detail
StandardLog
public StandardLog()(Code)
Creates a logging context forwarding events to the root logger (Logger.getLogger("")).



StandardLog
public StandardLog(Logger logger)(Code)
Creates a standard log context forwarding events to the specified logger.
Parameters:
  logger - the logger to which log events are forwarded to.




Method Detail
config
public static void config(String msg)(Code)
Logs a Level.CONFIG CONFIG message. If the current logging context is not a StandardLog no message is logged.
Parameters:
  msg - the config message.



entering
public static void entering(String sourceClass, String sourceMethod)(Code)
Log a method entry. If the current logging context is not a StandardLog no entry is logged.
Parameters:
  sourceClass - name of class that issued the logging request.
Parameters:
  sourceMethod - name of method that is being entered.



exiting
public static void exiting(String sourceClass, String sourceMethod)(Code)
Log a method return. If the current logging context is not a StandardLog no return is logged.
Parameters:
  sourceClass - name of class that issued the logging request.
Parameters:
  sourceMethod - name of method that is being returned.



fine
public static void fine(String msg)(Code)
Logs a Level.FINE FINE message. If the current logging context is not a StandardLog no message is logged.
Parameters:
  msg - the fine message.



finer
public static void finer(String msg)(Code)
Logs a Level.FINER FINER message. If the current logging context is not a StandardLog no message is logged.
Parameters:
  msg - the finer message.



finest
public static void finest(String msg)(Code)
Logs a Level.FINEST FINEST message. If the current logging context is not a StandardLog no message is logged.
Parameters:
  msg - the finest message.



getLogger
final public Logger getLogger()(Code)
Returns the logger to which this context forwards the events to. the logger for this standard logging context.



isErrorLogged
public boolean isErrorLogged()(Code)



isInfoLogged
public boolean isInfoLogged()(Code)



isLoggable
public static boolean isLoggable(Level level)(Code)
Checks if a message of the given level would actually be logged by this logger.
Parameters:
  level - the message logging level true if a message of specified level would actuallybe logged;false otherwise.



isWarningLogged
public boolean isWarningLogged()(Code)



log
public static void log(LogRecord record)(Code)
Log a specific LogRecord. If the current logging context is not a StandardLog , an LogContext.logError error , LogContext.logWarning warning or LogContext.logInfo info is possibly logged.
Parameters:
  record - the LogRecord to be published.



logError
public void logError(Throwable error, CharSequence message)(Code)



logInfo
public void logInfo(CharSequence message)(Code)



logWarning
public void logWarning(CharSequence message)(Code)



severe
public static void severe(String msg)(Code)
Logs a Level.SEVERE SEVERE message. If the current logging context is not a StandardLog a LogContext.warning warning message is logged.
Parameters:
  msg - the severe message.



throwing
public static void throwing(String sourceClass, String sourceMethod, Throwable thrown)(Code)
Logs throwing an exception. If the current logging context is not a StandardLog an LogContext.logError error is logged.
Parameters:
  sourceClass - name of class that issued the logging request.
Parameters:
  sourceMethod - name of the method.
Parameters:
  thrown - the error that is being thrown.



Fields inherited from javolution.context.LogContext
final public static Class CONSOLE(Code)(Java Doc)
final public static Configurable DEFAULT(Code)(Java Doc)
final public static Class NULL(Code)(Java Doc)
final public static Class STANDARD(Code)(Java Doc)
final public static Class SYSTEM_OUT(Code)(Java Doc)

Methods inherited from javolution.context.LogContext
protected void enterAction()(Code)(Java Doc)
public static void error(Throwable error)(Code)(Java Doc)
public static void error(Throwable error, CharSequence message)(Code)(Java Doc)
public static void error(Throwable error, String message)(Code)(Java Doc)
public static void error(CharSequence message)(Code)(Java Doc)
final public static void error(String message)(Code)(Java Doc)
protected void exitAction()(Code)(Java Doc)
public static Context getCurrent()(Code)(Java Doc)
public static LogContext getDefault()(Code)(Java Doc)
public static void info(CharSequence message)(Code)(Java Doc)
public static void info(String message)(Code)(Java Doc)
abstract public boolean isErrorLogged()(Code)(Java Doc)
abstract public boolean isInfoLogged()(Code)(Java Doc)
abstract public boolean isWarningLogged()(Code)(Java Doc)
abstract public void logError(Throwable error, CharSequence message)(Code)(Java Doc)
final public void logError(Throwable error, String message)(Code)(Java Doc)
abstract public void logInfo(CharSequence message)(Code)(Java Doc)
final public void logInfo(String message)(Code)(Java Doc)
abstract public void logWarning(CharSequence message)(Code)(Java Doc)
final public void logWarning(String message)(Code)(Java Doc)
public static void warning(CharSequence message)(Code)(Java Doc)
public static void warning(String message)(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.