public abstract class AbstractErrorLog
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static java.util.logging.Logger |
log |
protected WriteStream |
logStream |
Constructor and Description |
---|
AbstractErrorLog() |
Modifier and Type | Method and Description |
---|---|
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.
|
protected static final java.util.logging.Logger log
protected WriteStream logStream
public WriteStream getLogStream()
public void setLogStream(WriteStream os)
public void init() throws ServletException, java.io.IOException
ServletException
java.io.IOException
public abstract void log(java.lang.String message, HttpServletRequest request, HttpServletResponse response, ServletContext application) throws java.io.IOException
message
- the error messagerequest
- the servlet requestresponse
- the servlet responseapplication
- the servlet contextjava.io.IOException
public abstract void log(java.lang.String message, java.lang.Throwable exception, HttpServletRequest request, HttpServletResponse response, ServletContext application) throws java.io.IOException
message
- the error messageexception
- the thrown exceptionrequest
- the servlet requestresponse
- the servlet responseapplication
- the servlet contextjava.io.IOException
public void destroy() throws java.io.IOException
java.io.IOException