| Logger and Appender Object Language Reference |
| Applies to: | logger object |
| Syntax | |
| Arguments | |
| Details | |
| Example | |
| See Also |
Syntax |
| object.APPENDERREF = "appender-name"; |
specifies the name of the logger object.
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: | |||
|
Statement: |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.