LOG System Option: Windows

Specifies a destination for a copy of the SAS log when SAS is running in batch mode.

Valid in: configuration file, SAS invocation
Category: Environment Control: Files
PROC OPTIONS GROUP= ENVFILES, LOGCONTROL
Default: filename.LOG in batch mode, where filename is the name of your SAS job
Windows specifics: destination must be a valid Windows filename

Syntax

Required Arguments

LOG “destination

specifies the destination for the SAS log. The destination argument can be a valid Windows pathname or filename (including device names such as LPT1) or an environment variable that is associated with a pathname. If you specify only a pathname, the log file is created in the specified directory with the default name of filename.LOG, where filename is the name of your SAS job.

NOLOG

routes each log message to a message box, where one message is displayed per message box.

Details

The LOG system option specifies a destination for a copy of the SAS log when running in batch mode.
This system option is valid only in batch mode.
When you are running SAS interactively, the log is sent to the LOG window. In batch mode, the log is sent to a file named filename.LOG that is located in the current SAS directory, where filename is the name of your SAS job. You can use the LOG system option to specify an alternate destination.
To disable the display of the SAS log, use the NOTERMINAL system option.
When SAS is started with the OBJECTSERVER and NOTERMINAL system options and no log is specified, SAS discards all log messages.
When SAS is started with the OBJECTSERVER and NOTERMINAL system options active, and no log is specified, SAS discards all log and alternate log messages.
Using directives in the value of the LOG system option enables you to control when logs are open and closed and how they are named, based on real-time events, such as time, month, day of week. For a list of directives see the LOGPARM= system option in the SAS System Options: Reference.
If you start SAS in batch mode or in server mode and if the LOGCONFIGLOC= option is specified, logging is done by the SAS logging facility. The traditional SAS log option LOGPARM= is ignored. The traditional SAS log option LOG= is applied only when the %S{App.Log} conversion character is specified in the logging configuration file. For more information, see SAS Logging: Configuration and Programming Reference.

See Also

TERMINAL System Option in SAS System Options: Reference
LOGPARM= System Option in SAS System Options: Reference
The SAS Log in SAS Language Reference: Concepts