Logger and Appender Object Language Reference |
Applies to: | logger object |
Syntax | |
Arguments | |
Details | |
Example | |
See Also |
Syntax |
object.ADDITIVITY = "TRUE" | "FALSE"; |
specifies the name of the logger object.
determines whether a log event is processed by the appenders that exist in the specified logger's hierarchy.
Default: | TRUE |
Details |
By default, each log event is passed to the appenders that are associated with the logger and to the appenders that are associated with the logger's hierarchy. This is the meaning of the term appender additivity.
For example, assume that you have a logger, CONSOLE. The output of a log event of logger CONSOLE goes to all of the appenders that are in CONSOLE and its ancestors. However, if an ancestor of logger CONSOLE, say FILE, has the additivity flag set to FALSE, then CONSOLE's output is directed to all of the appenders that are in CONSOLE and its ancestors up to and including FILE, but not to the appenders that are in any of the ancestors of FILE.
Note: You can also specify the logger additivity in the logger's constructor by using the DECLARE statement. For more information, see DECLARE Statement, Logger Object.
Example |
The following code sets the additivity attribute to FALSE.
data _null_; if _n_ = 1 then do; declare logger logobj("mylog"); end; logobj.additivity="false"; run;
Alternatively, you can set the additivity attribute in the DECLARE statement.
data _null_; if _n_ = 1 then do; declare logger logobj("mylog", additivity:"false"); end; run;
See Also |
Statement: |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.