LEVEL Attribute

Defines the level of message that is accepted by the specified logger.
Applies to: logger object

Syntax

object.LEVEL= "level";

Required Arguments

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.

Details

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.

Example

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;

See Also