LOG (JANUS DEFINE parameter): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (minor cleanup)
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:LOG}}
<span class="pageSubtitle">LOG REQ | OPT [FORMAT COMMON | COMBINED] xxxx &mdash; set web log</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 ''[[Janus Web Server]]'' requests for the port are to be logged to a sequential dataset whose DDNAME is specified by '''xxxx'''.  
This parameter specifies that all <var class="product">[[Janus Web Server]]</var> requests for the port are to be logged to a sequential data set whose DDNAME is specified by ''xxxx'' in the <var>LOG</var> clause in the <var>JANUS DEFINE</var> (see syntax above).  


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.  
Valid only for <var>[[JANUS DEFINE#type|WEBSERV]]</var> ports.


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.  
==Specifying the LOG clause==
The <var>LOG</var> parameter must be followed by the <var>REQ</var> or <var>OPT</var> keyword. The <var>REQ</var> 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 <var>FORCE</var>'d (or not started if the error occurs at start time). The <var>OPT</var> 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.  


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.  
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 <var>FORMAT</var> keyword after the <var>OPT</var> or <var>REQ</var> keyword.  


The FORMAT keyword can also be written as <code>FMT</code>.  
The <var>FORMAT</var> keyword must be followed by either <var>COMBINED</var> or <var>COMMON</var>. The only difference between the <var>COMBINED</var> and <var>COMMON</var> formats are that the <var>COMBINED</var> 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 <var>COMBINED</var> format logs more information and almost all web log analysis tools support it, there is little reason to use <var>COMMON</var> format.  


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 <var>[[LOGAPPEND (JANUS DEFINE parameter)|LOGAPPEND]]</var> parameter can also be specified to get the same effect as DISP=MOD without the exclusive enqueue placed on the sequential dataset.  
The <var>FORMAT</var> keyword can also be written as <code>FMT</code>.  


The log dataset must have <code>RECFM=VB</code>.  
==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 <var>[[ALLOCATE command|ALLOCATE]]</var> command under either MVS or CMS. The log file DD could be specified with <code>DISP=MOD</code> (<var>APPEND</var> on the <var>ALLOCATE</var> 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 <var>[[LOGAPPEND (JANUS DEFINE parameter)|LOGAPPEND]]</var> parameter can also be specified to get the same effect as <code>DISP=MOD</code> without the exclusive enqueue placed on the sequential dataset.  


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.  
The log data set must have <code>RECFM=VB</code>.  


Valid only for <var>[[JANUS DEFINE#type|WEBSERV]]</var> ports.
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==
==Examples==
 
This command defines a Web port with a required web log named <code>WEBLOGJW</code>:
<p class="code"> JANUS DEFINE MYWEBPORT 80 WEBSERV 50 WEBUSER WEBUSER TRACE 0 UPCASE -
<p class="code">JANUS DEFINE MYWEBPORT 80 WEBSERV 50 WEBUSER WEBUSER TRACE 0 UPCASE -
      OBSIZE 10240 IBSIZE 10240 RBSIZE 10240 TIMEOUT 600 -
      OBSIZE 10240 IBSIZE 10240 RBSIZE 10240 TIMEOUT 600           -
      OPEN FILE MYFILE MAXTEMP 14000 COMPRESS 2 KEEPALIVE 30 -
      OPEN FILE MYFILE MAXTEMP 14000 COMPRESS 2 KEEPALIVE 30       -
      LOG REQ WEBLOGJW LOGCLOSET 57
      LOG REQ WEBLOGJW LOGCLOSET 57
</p>
</p>
<p class="caption">Web port with a required weblog named WEBLOGJW</p>


==See also==
==See also==

Latest revision as of 22:30, 19 October 2015

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

See also