SAS/IntrNet 9.1: Application Dispatcher |
Controls content and behavior of the Application Server log
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.
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.
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.
SAS/IntrNet 9.1: Application Dispatcher |