com.caucho.http.log
Class AbstractErrorLog

java.lang.Object
  extended by com.caucho.http.log.AbstractErrorLog
Direct Known Subclasses:
ErrorLog

public abstract class AbstractErrorLog
extends java.lang.Object

Represents an log of every error log request to the server.


Field Summary
protected static java.util.logging.Logger log
           
protected  WriteStream logStream
           
 
Constructor Summary
AbstractErrorLog()
           
 
Method Summary
 void destroy()
          Cleanup the log.
 WriteStream getLogStream()
          Returns the access-log's path.
 void init()
          Initialize the log.
abstract  void log(java.lang.String message, HttpServletRequest request, HttpServletResponse response, ServletContext application)
          Logs an error.
abstract  void log(java.lang.String message, java.lang.Throwable exception, HttpServletRequest request, HttpServletResponse response, ServletContext application)
          Logs an error.
 void setLogStream(WriteStream os)
          Sets the access-log's path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final java.util.logging.Logger log

logStream

protected WriteStream logStream
Constructor Detail

AbstractErrorLog

public AbstractErrorLog()
Method Detail

getLogStream

public WriteStream getLogStream()
Returns the access-log's path.


setLogStream

public void setLogStream(WriteStream os)
Sets the access-log's path.


init

public void init()
          throws ServletException,
                 java.io.IOException
Initialize the log.

Throws:
ServletException
java.io.IOException

log

public abstract void log(java.lang.String message,
                         HttpServletRequest request,
                         HttpServletResponse response,
                         ServletContext application)
                  throws java.io.IOException
Logs an error.

Parameters:
message - the error message
request - the servlet request
response - the servlet response
application - the servlet context
Throws:
java.io.IOException

log

public abstract void log(java.lang.String message,
                         java.lang.Throwable exception,
                         HttpServletRequest request,
                         HttpServletResponse response,
                         ServletContext application)
                  throws java.io.IOException
Logs an error.

Parameters:
message - the error message
exception - the thrown exception
request - the servlet request
response - the servlet response
application - the servlet context
Throws:
java.io.IOException

destroy

public void destroy()
             throws java.io.IOException
Cleanup the log.

Throws:
java.io.IOException