Category: | Logging |
Requirements: | The MAUTOSOURCE system option must be set. |
The %LOG4SAS autocall macro must be invoked before this macro is invoked to initialize the logging facility autocall macros. | |
Arguments that follow the FileRefAppender argument must be enclosed as a group in single quotation marks. |
Tip | Appender names are case sensitive. |
Requirements | Appender classes are case sensitive. In this instance, the class name must be FileRefAppender. |
FileRefAppender must be enclosed in double quotation marks. |
Requirement | The pattern must be enclosed in double quotation marks. |
Tip | If PATTERN is not specified, the default is the message. |
filename myfile "my.log"; %log4sas(); %log4sas_appender(myAppender,"FileRefAppender",'fileref=myfile'); %log4sas_logger(testlogger, 'level=info appender-ref=(myAppender)');
debugMyProgram
, names a log message destination using the fileref debugOut, and
specifies a pattern that reports the filename and the line number
of the application that generated the log event: filename debugOut="c:\myDebugOutput.txt"; %log4sas(); %log4sas_appender(debugMyProgram, "FileRefAppender", 'fileref=debugOut pattern="(%F:%L)%m" threshold=trace');