Share this page

# lr_debug_message

Sends a debug message to the log file.

    int lr_debug_message( unsigned int message_level, char *format, ... );

Alphabetical Listing - C Language Utility Functions

## Arguments

Name | Comments
--- | ---
message_level | One of the Message Log Runtime Settings. Disabled does not apply.
format | A formatted string which is the message to be sent to the log file. You may use the standard Message Formatting that is available for printf.

The lr_debug_message function sends a debug message when the specified message level is active. If the specified message level is not active, a message is not issued. You can set the active message level to MSG_CLASS_BRIEF_LOG or MSG_CLASS_EXTENDED_LOG from the user interface or by using lr_set_debug_message. To determine the current level, use lr_get_debug_message.

Note that you can also specify multiple message levels with an OR separator ("|"). If any one of the levels are active, the message is issued to the Output window.

The message is sent to the output window. To display the debug messages in the output window or log file, use the Expert Mode Settings. Activate Expert Mode (Tools > Expert Mode) and then choose Tools > Options > Debug Information and select the General check box.

lr_set_debug_message calls can affect the output.

## Return Values

This function returns the number of characters written, not including the terminating null-character. On error, it returns a negative value.

## Parameterization

You cannot use standard parameterization for any arguments in this function.

See Also

## Example

In the following example, lr_debug_message issues a message to the log when at least one of the extended log message flags is set.

Copy code

    lr_set_debug_message(LR_MSG_CLASS_EXTENDED_LOG, LR_SWITCH_ON);
    . . .
    rc = lrd_fetch(Csr1, 1, 1, 0, PrintRow3);
    if (rc>2000)
        lr_debug_message(LR_MSG_CLASS_RESULT_DATA | LR_MSG_CLASS_PARAMETERS, "Operation failed.");

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: