com.caucho.server.log
Class AbstractAccessLog

java.lang.Object
  extended by com.caucho.server.log.AbstractAccessLog
Direct Known Subclasses:
AccessLog

public abstract class AbstractAccessLog
extends java.lang.Object

Represents an log of every top-level request to the server.


Field Summary
protected  Path _path
           
protected  java.lang.String _pathFormat
           
protected static java.util.logging.Logger log
           
 
Constructor Summary
protected AbstractAccessLog()
           
 
Method Summary
 void addInit(ContainerProgram init)
           
 void destroy()
          Cleanup the log.
 void flush()
          Flushes the log.
 Path getPath()
          Returns the access-log's path.
 java.lang.String getPathFormat()
          Returns the formatted path
 void init()
          Initialize the log.
 boolean isHostnameDnsLookup()
          The hostname-dns-lookup flag for Apache compatibility.
abstract  void log(HttpServletRequest request, HttpServletResponse response, ServletContext application)
          Logs a request using the current format.
 void setHostnameDnsLookup(boolean enable)
          The hostname-dns-lookup flag for Apache compatibility.
 void setId(Path path)
          Sets the access-log's path (backwards compatibility).
 void setPath(Path path)
          Sets the access-log's path.
 void setPathFormat(java.lang.String pathFormat)
          Sets the formatted 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

_path

protected Path _path

_pathFormat

protected java.lang.String _pathFormat
Constructor Detail

AbstractAccessLog

protected AbstractAccessLog()
Method Detail

getPath

public Path getPath()
Returns the access-log's path.


setPath

public void setPath(Path path)
Sets the access-log's path.


getPathFormat

public java.lang.String getPathFormat()
Returns the formatted path


setPathFormat

public void setPathFormat(java.lang.String pathFormat)
                   throws ConfigException
Sets the formatted path.

Throws:
ConfigException

setId

public void setId(Path path)
Sets the access-log's path (backwards compatibility).


isHostnameDnsLookup

public boolean isHostnameDnsLookup()
The hostname-dns-lookup flag for Apache compatibility.


setHostnameDnsLookup

public void setHostnameDnsLookup(boolean enable)
The hostname-dns-lookup flag for Apache compatibility.


addInit

public void addInit(ContainerProgram init)

init

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

Throws:
ServletException
java.io.IOException

log

public abstract void log(HttpServletRequest request,
                         HttpServletResponse response,
                         ServletContext application)
                  throws java.io.IOException
Logs a request using the current format.

Parameters:
request - the servlet request.
response - the servlet response.
Throws:
java.io.IOException

flush

public void flush()
Flushes the log.


destroy

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

Throws:
java.io.IOException