Open topic with navigation
Changes the message level for the script execution.
int lr_set_debug_message( unsigned int message_level_flag, unsigned int on_off );
|Example: lr_set_debug_message||Message Functions|
int lr.set_debug_message( int message_level_flag, int on_off);
|Example: lr.set_debug_message||Message Functions||Java Syntax|
|message_level_flag||One of the Message Log Run-Time Settings.|
|on_off||A 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
The message level is initially set in the script's Run-time 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 Run-time Settings and all previous calls to lr_set_debug_message.
Regardless of the message level, if LoadRunner 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.
Caution: Using extended logging may inflate transaction times. We recommend that you use extended logging only while developing scripts, and not in actual load testing.
|Function||Does not write to log unless there is an error if:|
The lr_debug_message invocation's
LR_MSG_CLASS_BRIEF_LOG and LR_MSG_CLASS_EXTENDED_LOG are both cleared
|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)|
Returns 0 on success and -1 on failure.
You cannot use standard parameterization for any arguments in this function.