SK.gnome.dwarf.http.log
Class CommonLogFormat

java.lang.Object
  extended bySK.gnome.dwarf.GenericService
      extended bySK.gnome.dwarf.http.log.HTTPLogFormat
          extended bySK.gnome.dwarf.http.log.CommonLogFormat
All Implemented Interfaces:
SK.gnome.dwarf.Service

public class CommonLogFormat
extends HTTPLogFormat

NCSA Common Log Format.

To use the Combined Log Format, you must turn on logging of the "Referer" and "User-Agent" headers via the HTTPLogFormat.setReferer(boolean) and the HTTPLogFormat.setUserAgent(boolean) methods.


Field Summary
 
Fields inherited from class SK.gnome.dwarf.http.log.HTTPLogFormat
host, protocol, referer, userAgent
 
Fields inherited from class SK.gnome.dwarf.GenericService
initParameters, parent
 
Fields inherited from interface SK.gnome.dwarf.Service
INITIALIZED, LOG_DEBUG, LOG_ERROR, LOG_FATAL, LOG_INFO, LOG_TRACE, LOG_WARN, LOG_XFER, SHUTDOWN, STARTED, STOPPED
 
Constructor Summary
CommonLogFormat(java.lang.String name)
          Creates a new CommonLogFormat.
 
Method Summary
 java.lang.String format(long time, Request request, Response response)
          Formats the HTTP transfer log message.
 
Methods inherited from class SK.gnome.dwarf.http.log.HTTPLogFormat
setHost, setProtocol, setReferer, setUserAgent
 
Methods inherited from class SK.gnome.dwarf.GenericService
getAuthenticator, getAuthFacility, getFullName, getInitParameter, getInitParameterNames, getLogFacility, getLogger, getName, getParameters, getPrincipal, getShutdownTimeout, getState, init, log, log, login, logout, setAuthFacility, setInitParameters, setLogFacility, shutdown, start, stop, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CommonLogFormat

public CommonLogFormat(java.lang.String name)
Creates a new CommonLogFormat.

Method Detail

format

public java.lang.String format(long time,
                               Request request,
                               Response response)
Description copied from class: HTTPLogFormat
Formats the HTTP transfer log message.

This method must be overriden in order to implement a custom log format. It should read the HTTP-related information from the given request and response objects and create the log message according to them.

The log message returned by this method should include also the date and time information according to the given time argument.

Specified by:
format in class HTTPLogFormat
Parameters:
time - the current time
request - the finished request
response - the finished response
Returns:
the log message


Copyright (c) 1999-2005, Gnome Ltd. All rights reserved.