lr_set_debug_message

Changes the message level for the script execution.

C Language

int lr_set_debug_message( unsigned int message_level_flag, unsigned int on_off );
Example: lr_set_debug_messageMessage Functions

Java Language

int lr.set_debug_message( int message_level_flag, int on_off); 
Example: lr.set_debug_messageMessage FunctionsJava Syntax

Arguments

NameComments
message_level_flagOne of the Message Log Runtime Settings.
on_offA switch to activate or deactivate a specific message level setting. Use one of the On-Off Constants.

The lr_set_debug_message function changes the debug message level bitmap. By setting or clearing flags in the bitmap, you determine which information is sent by calls to lr_message, lr_log_message, lr_output_message and lr_debug_message. A flag is set by passing LR_SWITCH_ON as the argument for parameter on_off. A flag is cleared by passing LR_SWITCH_OFF.

The message level is initially set in the script's Runtime Settings dialog box. lr_set_debug_message changes the message level from the current value. Each call to lr_set_debug_message sets or clears the flag or flags specified in the call. A call does not change other flags that have been set or cleared. Therefore, the message level in effect is the result of the runtime settings and all previous calls to lr_set_debug_message.

Regardless of the message level, if LoadRunner Professional logs an error or the script calls lr_error_message, recent messages are written to the log. For example, if a message is sent with lr_output_message while only LR_MSG_CLASS_JIT_LOG_ON_ERROR is set, that message is not output. However, if there is an error shortly after the lr_output_message call, that message is output along with the error message.

Conditions where function does not write to the log
FunctionDoes not write to log unless there is an error if:
lr_debug_message

The lr_debug_message invocation's message_level argument is not equal to the message level in effect
or
LR_MSG_CLASS_DISABLE_LOG is set

lr_log_message

LR_MSG_CLASS_BRIEF_LOG and LR_MSG_CLASS_EXTENDED_LOG are both cleared
or
LR_MSG_CLASS_DISABLE_LOG is set

lr_message Only LR_MSG_CLASS_JIT_LOG_ON_ERROR is set (All other flags are cleared)
lr_output_message Only LR_MSG_CLASS_JIT_LOG_ON_ERROR is set (All other flags are cleared)

Return Values

Returns 0 on success and -1 on failure.

Parameterization

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

Concept Link IconSee Also