class Standard . HTTPextendedLogFormat {
set fieldNames;
oid fileObj;
string fileSpec;
int32 outputHeader;
string serviceName;
oid serviceOID;
} inherits from Object;
The HTTPextendedLogFormat class implements a logging service for the HTTPdaemon that records access activity. It registers itself as the service named HTTPlogger:websiteName; it defaults to HTTPlogger:localhost. See reference: http://www.w3.org/TR/WD-logfile.html.
A slightly simplified logging interface is provided by the class HTTPcommonLogFormat.
HTTPextendedLogFormat:create(string fileName, string servName)
See initialize.
HTTPextendedLogFormat:initialize(string fileName, string servName)
The initialize method usually takes at least 3 arguments. The first is a fileName to which access log records should be appended. If specified as the null string or "-", no log file is opened. The second argument specifies the name of the web server (corrresponding to the ServerName parameter in the profile read by HTTPdaemon) to which this logging object should be associated. To construct the name of the logging service, the value provided is appended to the prefix "HTTPlogger:".
The third and any remaining arguments identify the names of fields to be written to the each line of the log file. Any undefined values will be written as "-".
The naming conventions are defined in the Extended Log File specification referenced above. The list of current recognized attributes is provided below.
HTTPextendedLogFormat:reopen(optional string newFileName)
The reopen method requests that the current log file be closed and then reopened. This is typically invoked by a remote application during log file rotation: the current log file is renamed, then a reopen request is invoked, which causes the current log file to be closed and a new one to be created. If the optional argument newFileName is provided, it is set as the name of the new log file. If newFileName is specified as the null string or "-", then a new log file is not opened.
If fromObject is not nil, then a value indicating the success of the request is returned. A value of 0 indicates that the request was performed; a value of -1 indicates that a reopen was attempted but no log file was active and no new file name was provided.
HTTPextendedLogFormat:logFileOpened(oid fileObject)
The logFileOpened method is called each time a log file is opened. Subclasses can override this default implementation to extend or inhibit the implementation provided here.
The extended log format specification requires that a log file begin with two lines that the specify the version and fields provided in the log. The logFileOpened method writes this required data to the log file each time it is opened.
HTTPextendedLogFormat:logFileClosed(oid fileObject)
The logFileClosed method is called each time a log file is closed. Subclasses can override this default implementation to extend or inhibit the implementation provided here.
The logFileClosed method writes an "End-Date" directive to the log file each time it is closed.
HTTPextendedLogFormat:logRequest(string fromAddr, int32 localTime, array header, assoc options, int32 statusCode, int32 bytesSent, string reasonPhrase)
Objects of HTTPfastReceive send logRequest messages to the logging service associated with their corresponding web site (which is represented by a URLdirectory object).
This method returns no value.