Function : Log

LogEventText - Same as LogEvent, but first argument is a string, not an ID.
----------------------------------------------------------------------------------------------------------

#include <log.h>

STATUS LNVARARGS LogEventText(
char far *String,
HANDLE hModule,
STATUS AdditionalErrorCode,
<Any 'C' type> optional_var1, ...);

Description :

This function does the same thing as LogEvent but it takes a string as the first input parameter rather than the ID of a string in a string table. Use LogEventText instead of LogEvent if your program works in environments where Windows-style resources are not available.

This function formats an error message, displays it on the standard output, and enters it in the Domino Server or Notes client log database. The generated message has the form:

<DATE> <TIME> <Primary status message>: <Secondary status message>

LogEventText is similar to AddInLogErrorText but more flexible. LogEventText uses the second argument, "hModule", to resolve the third argument, "AdditionalErrorCode". If "AdditionalErrorCode" is a non-zero STATUS code returned from a C API function, then you may be able to use AddInLogErrorText. If "AdditionalErrorCode" is a string in the calling program's resource module, or some other resource module, then "hModule" must specify the module containing that resource.

The first parameter, "String", is the primary status message string. This string may contain printf-type (%) format specifiers. For each format specifier provided, there should be an additional argument provided for output, starting with the fourth argument. The print format specifiers supported by Domino are described in the Tech Note "Domino Print Format Specifiers". Tech Notes are listed in the view, Reference Tools/Tech Notes. The third parameter, "AdditionalErrorCode", may be another string resource ID, or it may be the STATUS returned from a C API function. The second parameter, "hModule", specifies where "AdditionalErrorCode" is resolved. You may specify NULLHANDLE for the second parameter if "AdditionalErrorCode" is resolved by Domino or by the calling program.

Parameters :

Sample Usage :

if (error = LogEventText("Unable to open input file %s.",
       NULLHANDLE, NOERROR, (char far *) szFileName))
  goto Exit;


See Also :

AddInFormatErrorText
----------------------------------------------------------------------------------------------------------