APPENDERREF Attribute

Specifies the name of the appender to which log events are passed.
Applies to: logger object

Syntax

object.APPENDERREF = "appender-name";

Required Arguments

object
specifies the name of the logger object.
appender-name
specifies the name of the appender to which the log events for the specified logger are passed.
Interactions 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.
The appender name must already exist. Appender names are created by using the DECLARE statement or in a logging configuration file.
See DECLARE Statement, Appender Object

Details

You can specify more than one appender for each logger.

Example

The logger object in the following example references the myappd appender.
filename myfref "my.log";

data _null_;
   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;

See Also

Attributes: