Java Doc for Log.java in  » Ajax » Laszlo-4.0.10 » org » openlaszlo » iv » flash » 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 » Ajax » Laszlo 4.0.10 » org.openlaszlo.iv.flash.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.openlaszlo.iv.flash.util.Log

Log
public class Log (Code)
Logger

After replacing jgenerator native logging system with log4j all the jgenerator classes like FileLogger, ConsoleLogger etc. are gone. But I decided to keep this class Log to avoid changing a lot of code which uses it.

Instead I changed its implementation to make it a wrapper for log4j.

log4j has several level methods, like 'debug', 'warn' etc., but jgenerator Log has only one method 'log' which takes the level of a message from its resource key's first character. I preserved this schema, so now if you use this class's log method it will call corresponding log4j method based on the first character of the message key, otherwise you can call any of log4j methods directly or using new Log methods with the same signature.

The default initialization procedure:

  • get property org.openlaszlo.iv.flash.log4j.configuration from iv.property file
  • if it exists and contains valid url or file name (either relative to jgen home or absolute) then use this url to initialize log4j (it can be either xml or property based configuration)
  • if the property does not exist or is not valid then use standard log4 initialization procedure, i.e. read system property log4j.configuration etc

author:
   Dmitry Skavish




Method Summary
protected static  void_log(Level level, String key, Object[] parms, Throwable t)
    
protected static  void_logif(String key, Object[] parms, Throwable t)
    
protected static  void_logif(Level level, String key, Object[] parms, Throwable t)
    
public static  voiddebug(Object msg)
    
public static  voiddebug(Object msg, Throwable t)
    
public static  voiddebugRB(String key, Object[] parms)
    
public static  voiddebugRB(String key, Object[] parms, Throwable t)
    
public static  voiderror(Object msg)
    
public static  voiderror(Object msg, Throwable t)
    
public static  voiderrorRB(String key, Object[] parms)
    
public static  voiderrorRB(String key, Object[] parms, Throwable t)
    
public static  voidfatal(Object msg)
    
public static  voidfatal(Object msg, Throwable t)
    
public static  voidfatalRB(String key, Object[] parms)
    
public static  voidfatalRB(String key, Object[] parms, Throwable t)
    
public static  LoggergetLogger()
    
public static  StringgetMessage(String key, Object[] parms)
    
public static  StringgetMessage(ResourceBundle rb, String key, Object[] parms)
    
public static  LevelgetMessageLevel(String key)
    
public static  voidinfo(Object msg)
    
public static  voidinfo(Object msg, Throwable t)
    
public static  voidinfoRB(String key, Object[] parms)
    
public static  voidinfoRB(String key, Object[] parms, Throwable t)
    
public static  voidlog(IVException e)
    
public static  voidlog(Throwable t)
    
public static  voidlogRB(IVException e)
    
public static  voidlogRB(Throwable t)
    
public static  voidlogRB(String key, Object[] p, Throwable t)
    
public static  voidlogRB(String key, Object[] p)
    
public static  voidlogRB(String key)
    
public static  voidlogRB(String key, Throwable t)
    
public static  voidsetDebugLevel()
    
public static  voidsetErrorLevel()
    
public static  voidsetFatalLevel()
    
public static  voidsetInfoLevel()
    
public static  voidsetLogToConsole()
    
public static  voidsetLogger(Logger logger)
    
public static  voidsetWarnLevel()
    
public static  voidwarn(Object msg)
    
public static  voidwarn(Object msg, Throwable t)
    
public static  voidwarnRB(String key, Object[] parms)
    
public static  voidwarnRB(String key, Object[] parms, Throwable t)
    



Method Detail
_log
protected static void _log(Level level, String key, Object[] parms, Throwable t)(Code)
Logs specified message to current logger

This method does not call those methods in Logger which are supposed to be used, but instead calls appenders directly thus avoiding double checking for levels, however this can be easily replaced with standard method, just swap the comments
Parameters:
  level - specified logger level
Parameters:
  key - message key
Parameters:
  parms - optional message parameters
Parameters:
  t - optional exception




_logif
protected static void _logif(String key, Object[] parms, Throwable t)(Code)
Checks if specified message is enabled under current level and logs the message if it is
Parameters:
  key - message key
Parameters:
  parms - optional message parameters
Parameters:
  t - optional exception



_logif
protected static void _logif(Level level, String key, Object[] parms, Throwable t)(Code)
Checks if specified level is enabled and logs the message if it is
Parameters:
  level - specified logger level
Parameters:
  key - message key
Parameters:
  parms - optional message parameters
Parameters:
  t - optional exception



debug
public static void debug(Object msg)(Code)



debug
public static void debug(Object msg, Throwable t)(Code)



debugRB
public static void debugRB(String key, Object[] parms)(Code)



debugRB
public static void debugRB(String key, Object[] parms, Throwable t)(Code)



error
public static void error(Object msg)(Code)



error
public static void error(Object msg, Throwable t)(Code)



errorRB
public static void errorRB(String key, Object[] parms)(Code)



errorRB
public static void errorRB(String key, Object[] parms, Throwable t)(Code)



fatal
public static void fatal(Object msg)(Code)



fatal
public static void fatal(Object msg, Throwable t)(Code)



fatalRB
public static void fatalRB(String key, Object[] parms)(Code)



fatalRB
public static void fatalRB(String key, Object[] parms, Throwable t)(Code)



getLogger
public static Logger getLogger()(Code)
Gets current logger current logger



getMessage
public static String getMessage(String key, Object[] parms)(Code)
Retrieves and formats a message given by its resource key

The messages is retrieved from resource bundle associated with current logger, then formatted using java.util.MessageFormat
Parameters:
  key - resource key, if message is not found in the resource then the key is used as a message
Parameters:
  parms - optional parameters formatted message




getMessage
public static String getMessage(ResourceBundle rb, String key, Object[] parms)(Code)
Retrieves and formats a message given by its resource key

The messages is retrieved from specified resource bundle or from standard jgenerator bundle if the specified one is null, then the message is formatted using java.util.MessageFormat
Parameters:
  rb - specified resource bundle
Parameters:
  key - resource key, if message is not found in the resource then the key is used as a message
Parameters:
  parms - optional parameters formatted message




getMessageLevel
public static Level getMessageLevel(String key)(Code)
Checks if a messages specified by given key is enabled under current log level
Parameters:
  key - message key true if message has to be logged



info
public static void info(Object msg)(Code)



info
public static void info(Object msg, Throwable t)(Code)



infoRB
public static void infoRB(String key, Object[] parms)(Code)



infoRB
public static void infoRB(String key, Object[] parms, Throwable t)(Code)



log
public static void log(IVException e)(Code)



log
public static void log(Throwable t)(Code)



logRB
public static void logRB(IVException e)(Code)
Logs IVException

IVException contains message with parameters inside and probably nested exception
Parameters:
  e - exception to log




logRB
public static void logRB(Throwable t)(Code)
Logs Exception
Parameters:
  e - exception to log



logRB
public static void logRB(String key, Object[] p, Throwable t)(Code)
Logs exception as message specified by its resource key
Parameters:
  key - resource key
Parameters:
  p - array of parameters
Parameters:
  t - exception to log



logRB
public static void logRB(String key, Object[] p)(Code)
Logs exception as message specified by its resource key
Parameters:
  key - resource key
Parameters:
  p - array of parameters



logRB
public static void logRB(String key)(Code)
Logs exception as message specified by its resource key
Parameters:
  key - resource key
Parameters:
  p - array of parameters



logRB
public static void logRB(String key, Throwable t)(Code)
Logs exception as message specified by its resource key
Parameters:
  key - resource key
Parameters:
  p - array of parameters



setDebugLevel
public static void setDebugLevel()(Code)



setErrorLevel
public static void setErrorLevel()(Code)



setFatalLevel
public static void setFatalLevel()(Code)



setInfoLevel
public static void setInfoLevel()(Code)



setLogToConsole
public static void setLogToConsole()(Code)
Sets log to console



setLogger
public static void setLogger(Logger logger)(Code)
Sets new logger

If you set new logger you probably also need to set ResourceBundle to it
Parameters:
  logger - new logger




setWarnLevel
public static void setWarnLevel()(Code)



warn
public static void warn(Object msg)(Code)



warn
public static void warn(Object msg, Throwable t)(Code)



warnRB
public static void warnRB(String key, Object[] parms)(Code)



warnRB
public static void warnRB(String key, Object[] parms, Throwable t)(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.