Previous Page | Next Page

Logger and Appender Object Language Reference

APPENDERREF Attribute



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

Syntax
Arguments
Details
Example
See Also

Syntax

object.APPENDERREF = "appender-name";


Arguments

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.

Details

You can specify more than one appender for each logger.


Example

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;


See Also

Attribute:

ADDITIVITY Attribute

Statement:

DECLARE Statement, Appender Object

Previous Page | Next Page | Top of Page