z/OS Communications Server: IP Programmer's Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


snmpSetLogFunction description

z/OS Communications Server: IP Programmer's Guide and Reference
SC27-3659-02

Use this function to define an external function to be used for logging SNMP manager API messages. You should define such a function if you want the SNMP manager API log messages to be logged to the same location as other applications on your system. Your logging function must have only two parameters: an integer to define the level of the log message, and a string to define the log message itself. After you have called the snmpSetLogFunction() function from your SNMP manager, all of the SNMP manager API log messages are sent to your defined logging function. An example definition for your logging function is as follows:
void myLogger(int logLevel, char *logMsg);
Based on that example, you would then need to set the parameter for this function to point to your logging function as follows:
SnmpLogFunc funcName = myLogger;
rc = snmpSetLogFunc(funcName);
If you choose not to define your own logging function, you can log messages to a file defined by the SNMP_MGR_LOG_FILE environment variable, or have messages logged to syslog (the default). For more information about your logging options, see Debugging the SNMP manager API.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014