LOGCONFIGLOC= System Option

Specifies the name of the XML configuration file or a basic logging configuration that is used to initialize the SAS logging facility.
Valid in: configuration file, SAS invocation, spawner invocation
Category: Environment control: Initialization and operation
PROC OPTIONS GROUP= EXECMODES
Alias: LOGCFGLOC=

Syntax

Syntax Description

file-specification
specifies the physical name of the XML configuration file that is used to initialize the SAS logging facility. The physical name is the name that is recognized by your operating system. Enclose the physical name in single or double quotation marks if the name contains spaces.
basic:level,FileAppender,path-and-filename-pattern
specifies to write messages to the specified file. basic: indicates to use the root logger. FileAppender indicates to use the FileAppender class.
Provide values for these arguments:
level
specifies the logging threshold. Valid values are TRACE, DEBUG, INFO, WARN, ERROR, or FATAL.
See Logging Thresholds
path-and-filename-pattern
specifies the path to which the log file is written and the conversion pattern that is used to create the log filename. The conversion pattern can include the %d and %S{key} conversion characters.
See d Conversion Character
S Conversion Character
Note The appender that SAS creates uses DEFAULTHEADER as the HeaderPattern parameter and DEFAULT for the ConvertionPattern parameter. For more information, see Conversion Patterns Supplied by SAS.
See FileAppender
About Basic Logging Configurations
basic:level,ConsoleAppender
specifies to write messages to the current console. basic: indicates the root logger. ConsoleAppender indicates to use the ConsoleAppender class.
Provide a value for this argument:
level
specifies the logging threshold. Valid values are TRACE, DEBUG, INFO, WARN, ERROR, or FATAL.
See Logging Thresholds
Note This configuration uses the conversion pattern DEFAULTHEADER for the HeaderPattern parameter and the conversion pattern DEFAULT for the ConversionPattern parameter.
See ConsoleAppender
About Basic Logging Configurations
basic:level
specifies to use the root logger. When the root logger is specified without an appender, messages are written to the traditional SAS log.
Provide a value for this argument:
level
specifies the logging threshold. Valid values are TRACE, DEBUG, INFO, WARN, ERROR, or FATAL.
See Logging Thresholds
See Logger
About Basic Logging Configurations

Details

The Basics

If the LOGCONFIGLOC= system option is specified when SAS starts, and if the SYSIN= option or the OBJECTSERVER option is also specified, logging is performed only by the logging facility; the SAS log is not started and the LOGPARM= system option is ignored. The LOG= system option is applied only when the %S{App.Log} conversion character is specified in the logging configuration file.

About Basic Logging Configurations

SAS provides three basic logging configurations for you to experiment with the logging facility:
  • basic:level,FileAppender,path-and-filename-pattern
  • basic:level,ConsoleAppender
  • basic:level
By using one the basic logging configurations, you can experiment with the logging facility without creating a configuration file. SAS creates a configuration file for you based on the basic logging configuration that you specify in the LOGCONFIGLOC= system option. The basic logging configurations enable messages to be written to a file, the current console, and the traditional SAS log.

Example

The following example shows the use of the LOGCONFIGLOC= system option for a user-specified logging configuration:
sas -logconfigloc metaserverlog.xml
The following example shows the use of the LOGCONFIGLOC= system option for a basic logging configuration:
sas -logconfigloc basic:INFO,FileAppender,c:\mylog\logFacility.%S{hostname}.log