Previous Page | Next Page

Autocall Macro Reference

Using Autocall Macros to Log Messages

SAS supplies a set of autocall macros that you can use in your SAS programs to log messages by using the SAS logging facility. SAS writes the SAS language logging facility messages to a file using the appender, FileRefAppender. FileRefAppender is the only logging facility appender that is available in the SAS language.

You use the following autocall macros to log messages by using the logging facility:

%LOG4SAS

initializes the autocall macro logging environment.

%LOG4SAS_APPENDER

defines an appender, which names the destination of the log message, a message layout, and a message threshold.

%LOG4SAS_LOGGER

defines a logger, which defines a message category for log messages and the appenders that are associated with the message category.

%LOG4SAS_DEBUG

is the log event that you use to write debug messages.

%LOG4SAS_TRACE

is the log event that you use to write trace messages.

%LOG4SAS_WARN

is the log event that you use to write warning messages.

%LOG4SAS_INFO

is the log event that you use to write informational messages.

%LOG4SAS_ERROR

is the log event that you use to write error messages.

%LOG4SAS_FATAL

is the log event that you use to write fatal messages.

In order to use the logging facility autocall macros, you must set the MAUTOSOURCE system option in order to activate the autocall facility. The MAUTOSOURCE system option is set by default.

For more information about autocall macros and the MAUTOSOURCE system option, see "Selected Autocall Macros Provided with SAS Software" and "MAUTOSOURCE System Option" in SAS Macro Language: Reference.

Previous Page | Next Page | Top of Page