com.caucho.http.log
Class AccessLog

java.lang.Object
  |
  +--com.caucho.http.log.AbstractAccessLog
        |
        +--com.caucho.http.log.AccessLog

public class AccessLog
extends AbstractAccessLog

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


Fields inherited from class com.caucho.http.log.AbstractAccessLog
dbg, path
 
Constructor Summary
AccessLog()
           
 
Method Summary
 void destroy()
          Closes the log, flushing the results.
 void flush()
          Flushes the log.
protected  java.lang.String getArchiveName(long time)
          Returns the name of the archived file
 void init()
          Initialize the log.
 void log(HttpServletRequest req, HttpServletResponse res, ServletContext application)
          Logs a request using the current format.
 void setArchiveFormat(java.lang.String format)
          Sets the archive name format
 void setFormat(java.lang.String format)
          Sets the access log format.
 void setRolloverPeriod(long period)
          Sets the log rollover period, rounded up to the nearest hour.
 void setRolloverSize(int size)
          Sets the log rollover size, rounded up to the megabyte.
 
Methods inherited from class com.caucho.http.log.AbstractAccessLog
getPath, setPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccessLog

public AccessLog()
Method Detail

setFormat

public void setFormat(java.lang.String format)
Sets the access log format.

setArchiveFormat

public void setArchiveFormat(java.lang.String format)
Sets the archive name format

init

public void init()
          throws ServletException,
                 java.io.IOException
Initialize the log.
Overrides:
init in class AbstractAccessLog

setRolloverPeriod

public void setRolloverPeriod(long period)
Sets the log rollover period, rounded up to the nearest hour.
Parameters:
period - the new rollover period in milliseconds.

setRolloverSize

public void setRolloverSize(int size)
Sets the log rollover size, rounded up to the megabyte.
Parameters:
size - maximum size of the log file, rolled up to the nearest meg.

log

public void log(HttpServletRequest req,
                HttpServletResponse res,
                ServletContext application)
         throws java.io.IOException
Logs a request using the current format.
Overrides:
log in class AbstractAccessLog
Parameters:
request - the servlet request.
response - the servlet response.

getArchiveName

protected java.lang.String getArchiveName(long time)
Returns the name of the archived file
Parameters:
time - the archive date

flush

public void flush()
           throws java.io.IOException
Flushes the log.

destroy

public void destroy()
             throws java.io.IOException
Closes the log, flushing the results.
Overrides:
destroy in class AbstractAccessLog