In SAS 9.4M6, the SAS Environment Manager Server logging system was changed from a rolling log system with a fixed maximum size and history count to a daily file.
For example, in SAS 9.4M6, the directory <SAS-configuration-directory>/Levn/Web/SASEnvironmentManager/server-5.8.0-EE/logs/ contains files named bootstrap-YYYY-MM-DD.log and server-YYYY-MM-DD.log. There is typically a server log present for each day that the SAS Environment Manager Server runs.
In SAS® 9.4M5 (TS1M5) and earlier releases, the default behavior is that the <SAS-configuration-directory>/Levn/Web/SASEnvironmentManager/server-5.8.0-EE/logs/ directory contains files named bootstrap.log(.#) and server.log(.#). The bootstrap.log files rolled over when they reached 5 MB in size, and retained five backup files dating from the current bootstrap.log. The server.log files rolled over when they reached 10 MB in size, and retained 30 backup files dating from the current server.log.
Workaround
If you want to revert the SAS 9.4M6 behavior to that of SAS 9.4M5 and earlier, you can perform the following workaround:
To do so, you must modify the files log4j2.xml (bootstrap.log) and server-log4j2.xml (server.log) in the path <SAS-configuration-directory>/Levn/Web/SASEnvironmentManager/server-5.8.0-EE/conf.
Updating the bootstrap.log File
- Make a backup copy of the log4j2.xml file in the <SAS-configuration-directory>/Levn/Web/SASEnvironmentManager/server-5.8.0-EE/conf directory.
- Open the file with your preferred text editor.
- In the Appender definition, make the following changes.
- In the RollingFile object, set the filePattern to filePattern="${sys:server.home}/logs/bootstrap.log.%i". Here is an example:
Remove this line: <RollingFile name="fileLogger" fileName="${sys:server.home}/logs/bootstrap.log" filePattern="${sys:server.home}/logs/bootstrap-%d{yyyy-MM-dd}.log">
Insert this line in its place: <RollingFile name="fileLogger" fileName="${sys:server.home}/logs/bootstrap.log" filePattern="${sys:server.home}/logs/bootstrap.log.%i">
- In the Appender Policies definition, comment out the TimeBasedTriggeringPolicy. Here is an example:
Remove this line: <TimeBasedTriggeringPolicy interval="1" modulate="true" />
Insert this line it its place: <!-- <TimeBasedTriggeringPolicy interval="1" modulate="true" /> -->
- In the Appender Policies definition beneath the TimeBasedTriggeringPolicy that you commented out, add this line: <SizeBasedTriggeringPolicy size="5 MB"/>
- Beneath the Policies definition (</Policies>), add this line: <DefaultRolloverStrategy max="5"/>
When you complete these steps, the Appender section for log4j2.xml should look similar to the following:
<Appenders>
<RollingFile name="fileLogger" fileName="${sys:server.home}/logs/bootstrap.log" filePattern="${sys:server.home}/logs/bootstrap.log.%i">
<PatternLayout>
<pattern>%d %-5p [%t] [%c@%L] %m%n</pattern>
</PatternLayout>
<Policies>
<!-- <TimeBasedTriggeringPolicy interval="1" modulate="true" /> -->
<SizeBasedTriggeringPolicy size="5 MB"/>
</Policies>
<DefaultRolloverStrategy max="5"/>
</RollingFile>
<Console name="console" target="SYSTEM_OUT">
<PatternLayout pattern="%d %-5p [%t] [%c@%L] %m%n" />
</Console>
</Appenders>
Updating the server.log File
- Make a backup copy of the server-log4j2.xml file in the <SAS-configuration-directory>/Levn/Web/SASEnvironmentManager/server-5.8.0-EE/conf directory.
- Open the file with your preferred text editor.
- In the Appender definition, make the following changes.
- In the RollingFile object, set the filePattern to filePattern="${sys:server.home}/logs/server.log.%i". Here is an example:
- Remove this line: <RollingFile name="fileLogger" fileName="${sys:server.home}/logs/bootstrap.log" filePattern="${sys:server.home}/logs/server-%d{yyyy-MM-dd}.log">
- Insert this line in its place: <RollingFile name="fileLogger" fileName="${sys:server.home}/logs/bootstrap.log" filePattern="${sys:server.home}/logs/server.log.%i">
- In the Appender Policies definition, comment out the TimeBasedTriggeringPolicy. Here is an example:
- Remove this line: <TimeBasedTriggeringPolicy interval="1" modulate="true" />
- Insert this line in its place: <!-- <TimeBasedTriggeringPolicy interval="1" modulate="true" /> -->
- In the Appender Policies definition beneath the TimeBasedTriggeringPolicy that you commented out, add this line: <SizeBasedTriggeringPolicy size="10 MB"/>
- Beneath the Policies definition (</Policies>), add this line: <DefaultRolloverStrategy max="30"/>
When you complete these steps, the Appender section for server-log4j2.xml should look similar to the following:
<Appenders>
<RollingFile name="fileLogger" fileName="${sys:server.home}/logs/server.log" filePattern="${sys:server.home}/logs/server.log.%i">
<PatternLayout>
<pattern>%d{dd-MM-yyyy HH:mm:ss,SSS z} %-5p [%t] [%c@%L] %m%n</pattern>
</PatternLayout>
<Policies>
<!-- <TimeBasedTriggeringPolicy interval="1" modulate="true" /> -->
<SizeBasedTriggeringPolicy size="10 MB"/>
</Policies>
<DefaultRolloverStrategy max="30"/>
</RollingFile>
<Console name="console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{dd-MM-yyyy HH:mm:ss,SSS z} %-5p [%t] [%c@%L] %m%n" />
</Console>
</Appenders>
After you have made the updates, restart the SAS Environment Manager Server. In Windows environments, do this by restarting the service. In UNIX environments, run the following command:
<SAS-configuration-directory>/Levn/Web/SASEnvironmentManager/server-5.8.0-EE/bin/hq-server.sh restart
Operating System and Release Information
| SAS System | SAS Environment Manager | Microsoft® Windows® for x64 | 2.5_M3 | | 9.4 TS1M6 | |
| 64-bit Enabled AIX | 2.5_M3 | | 9.4 TS1M6 | |
| 64-bit Enabled Solaris | 2.5_M3 | | 9.4 TS1M6 | |
| HP-UX IPF | 2.5_M3 | | 9.4 TS1M6 | |
| Linux for x64 | 2.5_M3 | | 9.4 TS1M6 | |
| Solaris for x64 | 2.5_M3 | | 9.4 TS1M6 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.