LOG (JANUS DEFINE parameter)

From m204wiki
Revision as of 23:19, 28 February 2012 by JAL2 (talk | contribs)
Jump to navigation Jump to search

<section begin="desc" />LOG REQ | OPT [FORMAT COMMON | COMBINED] xxxx -- set web log.<section end="desc" />

LOG is a parameter on JANUS DEFINE, which defines and sets characteristics of a Janus port. See the List of JANUS DEFINE parameters.

This parameter specifies that all Janus Web Server requests for the port are to be logged to a sequential dataset whose DDNAME is specified by xxxx.

The LOG parameter must be followed by either 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 is to continue running even if there is a problem logging to the log dataset.

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.

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 dataset must have RECFM=VB.

The same log dataset can be shared among multiple ports, though there is nothing in the log entries that indicates which port a request was associated with.

Valid only for WEBSERV ports.

Examples

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

Web port with a required weblog named WEBLOGJW

References

See: List of Janus commands | List of JANUS DEFINE parameters.