eSNMP API Routines
set_debug_level
set_debug_level
Sets the logging level, which dictates what log messages are generated. The
program or module calls the routine during program initialization in response to
run-time options.
Format
void set_debug_level ( int stat,
unsigned integer null );
Arguments
stat
The logging level. The following values can be set individually or in combination:
Level
Meaning
ERROR
Used when a bad error occurred; requires a restart.
WARNING
Used when a packet cannot be handled; also implies
ERROR. This is the default.
TRACE
Used when tracing all packets; also implies ERROR and
WARNING.
null
This parameter is not used by OpenVMS. It is supplied for compatibility with
UNIX.
Description
The logging level will be ERROR, WARNING, or TRACE.
If you specify TRACE, all three types of errors are generated. If you specify
ERROR, only error messages are generated. If you specify WARNING, both error
and warning messages are generated.
To specify logging levels for the messages in your subagent, use the ESNMP_LOG
routine.
Example
#include <esnmp.h>
if (strcmp("-t", argv[1] {
set_debug_level(TRACE,NULL);
} else {
set_debug_level(WARNING,NULL);
}
eSNMP API Routines 5–57