LOG System Option: UNIX

Specifies a destination for the SAS log when running in batch mode.
Valid in: configuration file, SAS invocation, SASV9_OPTIONS environment variable
Category: Environment control: Files
PROC OPTIONS GROUP= ENVFILES, LOGCONTROL
Default: a file in the current directory with the same filename as the SAS source file and an extension of .log
UNIX specifics: all

Syntax

-LOG file-specification | -NOLOG

Required Arguments

-LOG file-specification
specifies the destination for the SAS log. The file-specification can be any valid UNIX path to a directory, a filename, or an environment variable that is associated with a path. If you specify only the path to a directory, the log file is created in the specified directory. The default name for this file is filename.log, where filename is the name of your SAS job.
-NOLOG
suppresses the creation of the SAS log. Do not use this value unless your SAS program is thoroughly debugged.

Details

The LOG system option specifies a destination for the SAS log when running in batch mode. The LOG system option is valid in batch mode; it is ignored in interactive modes.
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, and so on. For a valid list of directives, see LOGPARM= System Option in SAS System Options: Reference.
If you start SAS in batch mode or server mode and the LOGCONFIGLOC= option is specified, logging is performed by the SAS logging facility. The traditional SAS log option LOGPARM= is ignored. The traditional SAS log option LOG= is honored only when the %S{App.Log} conversion character is specified in the logging configuration file. For more information, see the SAS Logging Facility in SAS Logging: Configuration and Programming Reference.
Note: When SAS is started with the OBJECTSERVER and NOTERMINAL system options and no log is specified, SAS discards all log and alternate log messages.

See Also

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