Java Doc for Logger.java in  » Portal » Open-Portal » com » sun » portal » providers » jsp » jasper3 » tomcat » 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 » Portal » Open Portal » com.sun.portal.providers.jsp.jasper3.tomcat.logging 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.portal.providers.jsp.jasper3.tomcat.logging.Logger

All known Subclasses:   com.sun.portal.providers.jsp.jasper3.jasper.JspCLogger,
Logger
abstract public class Logger (Code)
Interface for a logging object. A logging object provides mechanism for logging errors and messages that are of interest to someone who is trying to monitor the system.
author:
   Anil Vijendran (akv@eng.sun.com)
since:
   Tomcat 3.1


Field Summary
final public static  intDEBUG
    
final public static  intERROR
    
final public static  intFATAL
     Verbosity level codes.
final public static  intINFORMATION
    
final public static  intWARNING
    
protected  booleancustom
    
protected static  WriterdefaultSink
    
protected static  Hashtableloggers
    
protected  Stringname
    
 Stringpath
    
static  java.text.FieldPositionposition
    
protected  Writersink
    
protected  booleantimestamp
    
protected  StringtimestampFormat
    
protected  SimpleDateFormattimestampFormatter
    
protected  booleantimestampRaw
    


Method Summary
public synchronized  voidclose()
     Close the log.
abstract public  voidflush()
     Flush the log.
protected  StringformatTimestamp(long msec)
    
protected  voidformatTimestamp(long msec, StringBuffer buf)
    
public static  LoggergetLogger(String name)
    
public static  EnumerationgetLoggerNames()
    
public  StringgetName()
     Get name of this log channel.
public  StringgetPath()
    
public  StringgetTimestampFormat()
    
public  intgetVerbosityLevel()
     Get the current verbosity level.
public  booleanisOpen()
    
public  booleanisTimestamp()
    
public static  voidlog(String logName, String message, int verbosityLevel)
     Prints the log message on a specified logger.
public static  voidlog(String logName, String message)
     Prints the log message on a specified logger at the "default" log leve: INFORMATION
Parameters:
  name - the name of the logger.
final public  voidlog(String message, int verbosityLevel)
     Prints the log message.
final public  voidlog(String message)
    
final public  voidlog(String message, Throwable t, int verbosityLevel)
     Prints log message and stack trace.
Parameters:
  message - the message to log.
public  booleanmatchVerbosityLevel(int verbosityLevel)
    
public  voidopen()
     Open the log - will create the log file and all the parent directories.
public static  voidputLogger(Logger logger)
    
abstract protected  voidrealLog(String message)
     Subclasses implement these methods which are called by the log(..) methods internally.
abstract protected  voidrealLog(String message, Throwable t)
     Subclasses implement these methods which are called by the log(..) methods internally.
public static  voidremoveLogger(Logger logger)
    
public  voidsetCustomOutput(String value)
    
public static  voidsetDefaultSink(Writer w)
     Set the default output stream that is used by all logging channels.
public  voidsetName(String name)
     Set name of this log channel.
Parameters:
  name - Name of this logger.
public  voidsetPath(String path)
     Set the path name for the log output file.
Parameters:
  path - The path to the log file.
public  voidsetTimestamp(String value)
    
public  voidsetTimestampFormat(String value)
     If we are timestamping at all, what format do we use to print the timestamp? See java.text.SimpleDateFormat. Default = "yyyy-MM-dd hh:mm:ss".
public  voidsetVerbosityLevel(String level)
     Set the verbosity level for this logger.
public  voidsetVerbosityLevel(int level)
     Set the verbosity level for this logger.

Field Detail
DEBUG
final public static int DEBUG(Code)



ERROR
final public static int ERROR(Code)



FATAL
final public static int FATAL(Code)
Verbosity level codes.



INFORMATION
final public static int INFORMATION(Code)



WARNING
final public static int WARNING(Code)



custom
protected boolean custom(Code)



defaultSink
protected static Writer defaultSink(Code)



loggers
protected static Hashtable loggers(Code)



name
protected String name(Code)



path
String path(Code)



position
static java.text.FieldPosition position(Code)



sink
protected Writer sink(Code)



timestamp
protected boolean timestamp(Code)
Should we timestamp this log at all?



timestampFormat
protected String timestampFormat(Code)
The timestamp format string, default is "yyyy-MM-dd HH:mm:ss"



timestampFormatter
protected SimpleDateFormat timestampFormatter(Code)



timestampRaw
protected boolean timestampRaw(Code)
true = The timestamp format is raw msec-since-epoch
false = The timestamp format is a custom string to pass to SimpleDateFormat





Method Detail
close
public synchronized void close()(Code)
Close the log.



flush
abstract public void flush()(Code)
Flush the log.



formatTimestamp
protected String formatTimestamp(long msec)(Code)



formatTimestamp
protected void formatTimestamp(long msec, StringBuffer buf)(Code)



getLogger
public static Logger getLogger(String name)(Code)



getLoggerNames
public static Enumeration getLoggerNames()(Code)



getName
public String getName()(Code)
Get name of this log channel.



getPath
public String getPath()(Code)



getTimestampFormat
public String getTimestampFormat()(Code)



getVerbosityLevel
public int getVerbosityLevel()(Code)
Get the current verbosity level.



isOpen
public boolean isOpen()(Code)
Is this Log usable?



isTimestamp
public boolean isTimestamp()(Code)



log
public static void log(String logName, String message, int verbosityLevel)(Code)
Prints the log message on a specified logger.
Parameters:
  name - the name of the logger.
Parameters:
  message - the message to log.
Parameters:
  verbosityLevel - what type of message is this? (WARNING/DEBUG/INFO etc)



log
public static void log(String logName, String message)(Code)
Prints the log message on a specified logger at the "default" log leve: INFORMATION
Parameters:
  name - the name of the logger.
Parameters:
  message - the message to log.



log
final public void log(String message, int verbosityLevel)(Code)
Prints the log message.
Parameters:
  message - the message to log.
Parameters:
  verbosityLevel - what type of message is this?(WARNING/DEBUG/INFO etc)



log
final public void log(String message)(Code)
Prints the log message at the "default" log level: INFORMATION
Parameters:
  message - the message to log.



log
final public void log(String message, Throwable t, int verbosityLevel)(Code)
Prints log message and stack trace.
Parameters:
  message - the message to log.
Parameters:
  t - the exception that was thrown.
Parameters:
  verbosityLevel - what type of message is this?(WARNING/DEBUG/INFO etc)



matchVerbosityLevel
public boolean matchVerbosityLevel(int verbosityLevel)(Code)



open
public void open()(Code)
Open the log - will create the log file and all the parent directories. You must open the logger before use, or it will write to System.err



putLogger
public static void putLogger(Logger logger)(Code)



realLog
abstract protected void realLog(String message)(Code)
Subclasses implement these methods which are called by the log(..) methods internally.
Parameters:
  message - the message to log.



realLog
abstract protected void realLog(String message, Throwable t)(Code)
Subclasses implement these methods which are called by the log(..) methods internally.
Parameters:
  message - the message to log.
Parameters:
  t - the exception that was thrown.



removeLogger
public static void removeLogger(Logger logger)(Code)



setCustomOutput
public void setCustomOutput(String value)(Code)



setDefaultSink
public static void setDefaultSink(Writer w)(Code)
Set the default output stream that is used by all logging channels.
Parameters:
  w - the default output stream.



setName
public void setName(String name)(Code)
Set name of this log channel.
Parameters:
  name - Name of this logger.



setPath
public void setPath(String path)(Code)
Set the path name for the log output file.
Parameters:
  path - The path to the log file.



setTimestamp
public void setTimestamp(String value)(Code)
Do we need to time stamp this or not?
Parameters:
  value - "yes/no" or "true/false"



setTimestampFormat
public void setTimestampFormat(String value)(Code)
If we are timestamping at all, what format do we use to print the timestamp? See java.text.SimpleDateFormat. Default = "yyyy-MM-dd hh:mm:ss". Special case: "msec" => raw number of msec since epoch, very efficient but not user-friendly



setVerbosityLevel
public void setVerbosityLevel(String level)(Code)
Set the verbosity level for this logger. This controls how the logs will be filtered.
Parameters:
  level - one of the verbosity level strings.



setVerbosityLevel
public void setVerbosityLevel(int level)(Code)
Set the verbosity level for this logger. This controls how the logs will be filtered.
Parameters:
  level - one of the verbosity level codes.



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)

w_w___w.___j__a___v_a___2s._c_o_m | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.