beautypg.com

Esnmp_log – Compaq AAR04BCTE User Manual

Page 117

background image

eSNMP API Routines

ESNMP_LOG

ESNMP_LOG

This is an error declaration C macro defined in the ESNMP.H header file. It

gathers the information that it can obtain and sends it to the log.

Format

ESNMP_LOG ( level,

format, ... );

Description

The

esnmp_log

routine is called using the ESNMP_LOG macro, which uses the

helper routine

esnmp_logs

to format part of the text. Do not use these functions

without the ESNMP_LOG macro. For example:

#define ESNMP_LOG(level, x) if (is_debug_level(level)) { \

esnmp_log(level, esnmp_logs x, __LINE__, __FILE__);}

Where:

x is a text string; for example, a

printf

statement.

level is one of the following:

ERROR

Declares an error condition.

WARNING

Declares a warning.

TRACE

Puts a message in the log file if trace is active.

For more information about configuration options for logging and tracing, refer to
the Compaq TCP/IP Services for OpenVMS Management guide.

Example

#include
ESNMP_LOG( ERROR, ("Cannot open file %s\n", file));

eSNMP API Routines 5–59