LOG (JANUS DEFINE parameter)
LOG REQ | OPT [FORMAT COMMON | COMBINED] xxxx — set web log
LOG is a parameter on JANUS DEFINE, which defines and sets characteristics of a Janus port.
This parameter specifies that all Janus Web Server requests for the port are to be logged to a sequential data set whose DDNAME is specified by xxxx in the LOG clause in the JANUS DEFINE (see syntax above).
Valid only for WEBSERV ports.
Specifying the LOG clause
The LOG parameter must be followed by the REQ or OPT keyword. The REQ keyword indicates that web request logging is required, and if it is not possible because of an error opening the log file, an I/O error on the log file or the log file filling up, the port is automatically FORCE'd (or not started if the error occurs at start time). The OPT keyword indicates that the port can be started even if there is an error opening the file, and the port can continue to run even after a problem logging to the log data set.
By default the log is in "COMBINED" format which is understood by almost all web log analysis tools. It is possible for the log to be kept in "COMMON" format. Either format can be explicitly requested with the FORMAT keyword after the OPT or REQ keyword.
The FORMAT keyword must be followed by either COMBINED or COMMON. The only difference between the COMBINED and COMMON formats are that the COMBINED format logs the browser type (Netscape, Internet Explorer, a bot) and the "referer," namely the URL of the page from which the URL being requested was linked. Since the COMBINED format logs more information and almost all web log analysis tools support it, there is little reason to use COMMON format.
The FORMAT keyword can also be written as FMT
.
Defining the log file
The log file DD must be defined to the Online with a DD card under MVS, a FILEDEF statement under CMS, or an ALLOCATE command under either MVS or CMS. The log file DD could be specified with DISP=MOD
(APPEND on the ALLOCATE command) so that the log file could contain data that spans multiple starts and stops of the web port or even multiple runs of the Online. In fact, it might be reasonable to keep a log file that contains data over a long span of time such as a month or even a year. Under MVS, the LOGAPPEND parameter can also be specified to get the same effect as DISP=MOD
without the exclusive enqueue placed on the sequential dataset.
The log data set must have RECFM=VB
.
The same log data set can be shared among multiple ports, though there is nothing in the log entries that indicates which port a request was associated with.
Examples
This command defines a Web port with a required web log named WEBLOGJW
:
JANUS DEFINE MYWEBPORT 80 WEBSERV 50 WEBUSER WEBUSER TRACE 0 UPCASE - OBSIZE 10240 IBSIZE 10240 RBSIZE 10240 TIMEOUT 600 - OPEN FILE MYFILE MAXTEMP 14000 COMPRESS 2 KEEPALIVE 30 - LOG REQ WEBLOGJW LOGCLOSET 57