Function : AddIn

AddInLogMsg - Format and write a message to the log file (uses string resources).
----------------------------------------------------------------------------------------------------------

#include <addin.h>

void LNPUBLIC AddInLogMsg(
STATUS StringID,
char far *Arg);

Description :

AddInLogMsg formats an error message, displays it on the standard output, and appends the message as new line to the "Events" field in a Miscellaneous Events document in the Domino server or Notes client log. The generated message has the form:

<DATE> <TIME> <status message>

The first parameter, StringID, is a resource ID. It must identify a string resource located in the calling program's resource module. The string specified by StringID may contain one printf-type format specifier. If it does, the second parameter, Arg, must point to a printf-type argument that resolves the format specifier. Only one format specifier argument is supported in this function. Use AddInLogMessage if more than one format specifier argument is needed. The print format specifiers supported by Domino are described in the TechNote "Domino Print Format Specifiers".

Use AddInLogMsg to log events that are not associated with a STATUS code returned from a C API function. AddInLogMsg is a macro that calls AddInLogError:

#define AddInLogMsg(s, e) AddInLogError(s, NOERROR, e)

AddInLogMsg may be called from a NotesMain, main, or AddInMain API program.

Parameters :

Sample Usage :

/* #define MSG_SMKADDN_STARTED                     (PKG_ADDIN+11)    */
/*    msgtext(MSG_SMKADDN_STARTED, "Smoke Addin Example Started up") */
 
/* Log the task status: message appears on console display and  */
/* in Miscellaneous "Events" View in the server's LOG.NSF       */

AddInLogMsg(MSG_SMKADDN_STARTED);


See Also :

AddInLogError
----------------------------------------------------------------------------------------------------------