You can determine the specific loggers and thresholds that are used to write information to a SAS® Integration Technologies server log. By determining the specific loggers and thresholds, you can then use this information to create a custom logconfig file that only logs the information that you specify.
To create a custom logconfig file and determine specific loggers and thresholds, follow these steps:
Note: Before you proceed with these steps, you should have a thorough understanding of the information in "Administering Logging for SAS Servers" in the SAS® 9.2 Intelligence Platform: System Administration Guide.
- Create a logconfig file to discover the loggers and thresholds. You can create the file as follows:
- Copy the logconfig.trace.xml file from the SAS Workspace Server.
- Rename the copy to a new name, such as logconfig.discover.xml.
- Make the following changes to the new logconfig file:
-
- Change the value for the fileNamePattern parameter of the RollingFileAppender so that the filename is unique and points to the log's directory for the appropriate server.
- Change the value for the ConversionPattern parameter of the RollingFileAppender to %d %u %c: %p - %m.
- Delete the Application message logger.
- Change the IOM protocol message logger to IOM.PE and change the level to ERROR. These changes reduce the size of the log file by omitting the TCP packet information that is logged.
- Change the level for the Root logger to TRACE.
- The resulting changes should look similar to this file:
logconfig.discover.xml - Add the -logconfigloc system option to the sasv9_usermods.cfg file. The sasv9_usermods.cfg file is located in the directory of the server for which the new logging will be implemented.
- Point to the new logconfig file. For example, you could point to the file as follows:
-logconfigloc "C:\SAS\Config\Lev1\SASApp\WorkspaceServer\logconfig.discover.xml"
- In the generated log file, search for the information that you want. For example, if a SAS data set is opened by a client, then search for the name of the SAS data set in the log file. The complete logger and threshold that are used to log the opening of the data set will be specified in the log, similar to the following:
2010-09-23T10:02:52,015 sasdemo App.Libref.Libref.OpenDataSet: TRACE - IOM CALL {compRef:6f8f960}->Libref::OpenDataSet():
flags=1
dataSetName=CARS
options=
password=[] (no elements)
- This specific logger can then be used in a custom logconfig file to log the data sets that are being used:
<!-- Application message logger -->
<logger name="App.Libref.Libref.OpenDataSet">
<level value="Trace"/>
</logger>
For more information about logging, see the SAS® 9.2 Logging: Configuration and Programming Reference.