LOG (JANUS DEFINE parameter): Difference between revisions
m (→Examples) |
mNo edit summary |
||
Line 1: | Line 1: | ||
<span class="pageSubtitle"><section begin="desc" />LOG REQ | OPT [FORMAT COMMON | COMBINED] xxxx — set web log<section end="desc" /></span> | <span class="pageSubtitle"><section begin="desc" />LOG REQ | OPT [FORMAT COMMON | COMBINED] xxxx — set web log<section end="desc" /></span> | ||
<var>LOG</var> is a parameter on [[JANUS DEFINE]], which defines and sets characteristics of a Janus port. | <var>LOG</var> is a parameter on <var>[[JANUS DEFINE]]</var>, which defines and sets characteristics of a Janus port. | ||
This parameter specifies that all | This parameter specifies that all <var class="product">[[Janus Web Server]]</var> requests for the port are to be logged to a sequential dataset whose DDNAME is specified by '''xxxx'''. | ||
The <var>LOG</var> 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. | The <var>LOG</var> 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. |
Revision as of 17:53, 1 March 2012
<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.
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
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