Overview of the SAS Logging Facility

What Is the Logging Facility?

The SAS 9.3 logging facility is a flexible, configurable framework that you can use to collect, categorize, and filter events and write them to a variety of output devices. The logging facility supports problem diagnosis and resolution, performance and capacity management, and auditing and regulatory compliance. The logging facility has the following features:
  • Log events are categorized using a hierarchical naming system that enables you to configure logging at a broad or a fine-grained level.
  • Log events can be directed to multiple output destinations, including fixed files, rolling files, operating system facilities, client applications, database tables, message queues, and custom Java classes. For each output destination, you can specify the following logging facility components:
    • the categories and levels of log events to report
    • the message layout, including the types of data to be included, the order of the data, and the format of the data
    • filters based on criteria such as diagnostic levels and message content
  • Logging levels can be adjusted dynamically without starting and stopping processes.
  • Performance-related log events can be generated for processing by the Application Response Measurement (ARM) 4.0 agent.
The logging facility is used by most SAS server processes. You can also use the logging facility within SAS programs.

Who Uses the Logging Facility?

This guide is for both administrators, who configure the SAS logging facility, and for programmers, who can use the logging facility in their SAS programs.
Auditors use this guide to understand the logging process and the information that the logging facility generates.

Comparing the SAS Logging Facility and the SAS Log

The SAS logging facility and the SAS log are two different logging systems within SAS.
Traditionally, the SAS log displays information, warning, and error messages as a result of executing SAS programs or SAS global statements. Regardless of their origin, all messages are destined for a single log.
By contrast, the SAS logging facility is a framework that categorizes and filters log messages in SAS server and SAS programming environments, and writes log messages to various output devices. In the server environment, the logging facility logs messages based on predefined message categories, such as Admin for administrative messages, App for application messages, and Perf for performance messages. Messages for a category can be written to files, consoles, and other system destinations simultaneously. The logging facility also enables messages to be filtered based on the following thresholds: TRACE, DEBUG, INFO, WARN, ERROR, and FATAL.
In the programming environment, if the logging facility is initialized for SAS server logging, messages are written to logging facility destinations only. If the logging facility is not initialized for SAS server logging, messages are written to the SAS log and to logging facility destinations that are created in a SAS program.