The logMsg function
Adds a logging message to your user-defined function or aggregate.
Syntax
logMsg(flag, fmt-string, args...)The flag argument specifies the output level for the message, which you can use to control the verbosity of the debugging output. If logging is enabled at the specified flag level, all of the messages with that flag level are output to standard output and the specified log file. The valid values are LOG_DEBUG, LOG_TRACE, or both values OR’ed together. DEBUG is usually a higher-level tracing category that provides messages for actions in the main body. TRACE is typically used in lower-level areas of the code, such as loops or other subareas of code. For example, you might put a logMsg statement with LOG_DEBUG in the main body, and several more detailed statements with a LOG_TRACE level inside a loop. For messages that you want to display under either output mode, you can specify LOG_DEBUG|LOG_TRACE as an OR’ed value.
The fmt-string value specifies the logging message, which is enclosed in double quotation marks, and must end with a newline character (\n). If you want to include substitution values in the message, you can do so and then specify the values by using the args value. The fmt-string value can include vsnprintf() formatted conversion specifications such as %i (optionally signed integer), %lld (long long decimal), %llu (long long unsigned int), and the like. For a description of the available options, see the vsnprintf() documentation or man pages.
The args value specifies zero or more substitution arguments that you want to specify in the output message. The args values must correspond in type and number to substitution switches in the fmt-string.
Usage
The logMsg function specifies an output message that you can use to follow the operational steps of a UDX, which can help you to identify debugging steps and other information about the function. You enable the logging by using the nzudxdbg command.