|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object SK.gnome.dwarf.GenericService SK.gnome.dwarf.http.log.HTTPLogFormat SK.gnome.dwarf.http.log.ExtendedLogFormat
W3C Extended Log Format.
The log format is described by the following string:
#Fields: date time c-ip cs(Host) cs-user cs-method cs-uri cs-protocol sc-status bytes time-taken cs(Referer) cs(User-Agent)
Logging of the "Host" header, the HTTP protocol, the "Referer" header and "User-Agent" header can be controlled via the corresponding setter methods, inherited from the superclass.
Logging of the "Host" request header may be useful for distinguishing requests to various virtual servers if they are logged to a single central file. This feature is enabled by default.
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 | |
ExtendedLogFormat(java.lang.String name)
Creates a new ExtendedLogFormat. |
Method Summary | |
java.lang.String |
format(long time,
Request request,
Response response)
Formats the HTTP transfer log message. |
void |
init(SK.gnome.dwarf.Server parent)
|
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, 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 |
public ExtendedLogFormat(java.lang.String name)
Method Detail |
public void init(SK.gnome.dwarf.Server parent) throws SK.gnome.dwarf.ServiceException
SK.gnome.dwarf.ServiceException
public java.lang.String format(long time, Request request, Response response)
HTTPLogFormat
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.
format
in class HTTPLogFormat
time
- the current timerequest
- the finished requestresponse
- the finished response
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |