Valid in: | DATA step |
Category: | Action |
Type: | Executable |
Alias: | DCL |
Requirement | The name must be enclosed in double quotation marks. |
Tip | You can specify the root logger by setting name equal to either double quotation marks with no space between them (" "), or to "root". If you specify the root logger, these settings are in effect only during the lifespan of the DATA step. Root settings before and after the DATA step are based on the logging configuration file. |
Restriction | ADDITIVITY can be modified for a logger only if the logger’s IMMUTABILITY option in the logging configuration file is set to FALSE. If you cannot modify a logger’s ADDITIVITY option, contact your system administrator. |
Tip | You can also specify this optional argument by using the ADDITIVITY Attribute after the logger instance has been created. |
Requirement | The appender name must already exist. Appender names are created by using the DECLARE Statement, Appender Object or are defined in a logging configuration file. |
Interaction | If the ADDITIVITY argument is set to TRUE, the log events are also passed to all the appenders that are associated with the logger's hierarchy. |
Tips | You can specify more than one appender for each logger. |
You can also specify this optional argument by using the APPENDERREF attribute after the logger instance has been created. For more information, see APPENDERREF Attribute. | |
See | DECLARE Statement, Appender Object |
Restriction | LEVEL can be modified for a logger only if the logger’s IMMUTABILITY option in the logger configuration file is set to FALSE. If you cannot modify a logger’s LEVEL option, contact your system administrator. |
Requirement | The level must be enclosed in double quotation marks. |
Tip | You can also specify this optional argument by using the LEVEL Attribute after the logger instance has been created. |
data _null_; if _n_ = 1 then do; declare appender appobj("myappd", "FileRefAppender", "fileref=myfref"); appobj.threshold="trace"; declare logger logobj("mylog"); logobj.appenderref="myappd"; end; logobj.level="trace"; logobj.debug("Test debug message"); logobj.level="info"; logobj.info("Test info message"); run;