Contents SAS/IntrNet 9.1: Application Dispatcher Previous Next

LOG Statement


Controls content and behavior of the Application Server log


Syntax

LOG <DISPLAY=NONE | ERRORS | ALL> <SYMBOLS=NONE | ERRORS | ALL> <FILE=fileref> <APPEND | REPLACE>;


The Application Server has several options to control the content and operation of the SAS log. The SAS log can be re-directed to a new file based on the date, the day of the week, or the time. The log contains information about each client request. The log can be limited to a brief note for each request, or can capture the complete SAS log for the request.

By default, the configuration utility (inetcfg) sets up the server so that a new log file is created each day of the week. Separate log files are created for each unique port so that there are no conflicts when two or more servers are active. Each time a server is started, it appends to an existing log file unless the log file has not been modified in the last six days. If the log file is at least six days old, it is replaced by a new log file. See Default Log File Append Behavior for a more complete description. You can change this behavior by editing the LOG statement in the appstart.sas file that is created by the configuration utility and by using the options described below.

Note: z/OS Application Servers always append to existing log files regardless of their last modified date unless the REPLACE option is specified.


Arguments

DISPLAY=NONE | ERRORS | ALL
controls whether the SAS log for each client request is written to the Application Server log. The request log can be ignored for all requests, written only for requests that complete with errors, or written for all requests.

SYMBOLS=NONE | ERRORS | ALL
controls whether the client request symbols are written to the Application Server log. The symbols can be logged for all requests, logged only for requests that complete with errors, or never logged.

FILE=fileref
enables you to re-direct the SAS log file of the Application Server to another file. The fileref should be defined in an ALLOCATE FILE statement. The physical path of the fileref can contain any of the following date and time directives.
Date and Time Directives
%a Day of week [Sun - Sat]
%b Month [Jan - Dec]
%d day [01 -31]
%H hour [00 - 23]
%m month [01 - 12]
%w day of week [1=Sunday - 7=Saturday]
%Y full year
%y 2-digit year [00 - 99]
%p port number of listen port
%n nodename up to first period (.)

For example:


   allocate file one "/u/username/%a_%p.log"; 

   ...

   log file=one;

creates /u/username/Mon_5001.log if the Application Server starts on a Monday, /u/username/Tue_5001.log if it starts on a Tuesday, and so on.

Periodically, the Application Server regenerates the log file name and checks to see if it is different from the current log file. If it is different, the current log file is closed, and the new log file with the new name is opened. In the previous example, shortly after midnight, early Tuesday morning, the log file /u/username/Mon_5001.log is closed and the file /u/username/Tue_5001.log is opened.

Note: On z/OS, this feature is supported only if the log file is specified as a hierarchical file system (HFS) path, as shown in the previous ALLOCATE FILE statement. (In order to correctly specify an HFS fileref for an Application Server on z/OS, SAS must be started with the HFS option.) You cannot use partitioned data set members for log files on z/OS.

APPEND | REPLACE
specifies whether the Application Server always appends (APPEND) to an existing log file or replaces (REPLACE) the contents of an existing log file.

Default Log File Append Behavior

The Application Server has special default behavior to simplify the management of server logs. If neither the APPEND nor the REPLACE options are specified, the server replaces the contents of an existing log file if the last modification date is greater than six days ago (actually, 5 days, 23 hours). If the last modification date is less than six days ago, the server appends to the existing log file.

For example, if log file Mon_5001.log has a last modification date of 5:00 p.m., Monday, June 14, and the Application Server is re-started at 8:00 p.m. on the same day, the server appends to the existing log. If the server is restarted on Monday, June 21, the server replaces the contents of the log file. This behavior, together with the service files that are created by the inetcfg utility, ensures that server logs are kept for six days and then are automatically overwritten.

Note: z/OS Application Servers always append to an existing log file unless the REPLACE option is specified. In addition, you cannot use partitioned data set members for log files on z/OS.


Contents SAS/IntrNet 9.1: Application Dispatcher Previous Next