Logger and Appender Object Language Reference |
Defines the level of message that is accepted by the specified
logger.
Applies to: |
logger object
|
- object
-
specifies the name of the logger object.
- level
-
specifies the level at which a logging request is applied
for the specified logger object. Valid values are TRACE, DEBUG, INFO, WARN,
ERROR, and FATAL.
Requirement: |
The level must be enclosed in double
quotation marks. |
A logging request is applied if its level is greater than the level of the
logger. Otherwise, the logging request is ignored. Loggers without an explicitly
assigned level inherit their level from the hierarchy. For more information
about the logging levels, see Logging Thresholds.
Note: You can specify the logger level in the logger's constructor by
using the DECLARE statement. For more information, see DECLARE Statement, Logger Object. ![[cautionend]](../../../../common/63294/HTML/default/images/cautend.gif)
The following code sets the attribute level to trace.
data _null_;
if _n_ = 1 then do;
declare logger logobj("mylog"):
end;
logobj.additivity="false";
logobj.level="trace";
run;
Alternatively, you can set the level attribute in the DECLARE statement
constructor.
data _null_;
if _n_ = 1 then do;
declare logger logobj("mylog", additivity:"false", level:"trace");
end;
run;
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.