Logger and Appender Object Language Reference |
Specifies the name of the appender to which log events are passed.
Applies to: |
logger object
|
object.APPENDERREF =
"appender-name";
|
- object
-
specifies the name of the logger object.
- appendername
-
specifies the name of the appender to which the log events
for the specified logger are passed.
Interaction: |
If the ADDITIVITY attribute is set
to TRUE, the log events are also passed to all the appenders that are associated
with the logger's hierarchy. |
Interaction: |
The appender name must already exist.
Appender names are created by using the DECLARE statement. For more information,
see DECLARE Statement, Appender Object. |
You can specify more than one appender for each logger.
The logger object in the following example references the myappd appender.
data _null_;
filename myfref "my.log";
if _n_ = 1 then do;
declare appender appobj("myappd", "FileRefAppender", "FileRef=myfref");
declare logger logobj("mylog", level: "info");
logobj.appenderref="myappd";
end;
logobj.additivity="false";
logobj.info("my info message");
run;
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.