Wednesday, 2 September 2015

lr_get_debug_message

Q1: lr_get_debug_message
Q2: Explain lr_get_debug_message

The lr_get_debug_message() is returns the current log settings of the script.

The returned value is saved in a unsigned int varible.

Example:
unsigned int log_options;
log_options=lr_get_debug_message();
lr_output_message("The current log setting value is%d",log_options);

Answer:
The current log setting value is 4
so the current log setting is LR_MSG_CLASS_PARAMETERS


Log Level C Constant Value
-------------------------------------------------------------------------------------------------------------
Disabled LR_MSG_CLASS_DISABLE_LOG                                              0
--------------------------------------------------------------------------------------------------------------
Brief LR_MSG_CLASS_BRIEF_LOG                                                         1
------------------------------------------------------------------------------------------------------------
Extended Log LR_MSG_CLASS_EXTENDED_LOG                                16
--------------------------------------------------------------------------------------------------------------
Result Data LR_MSG_CLASS_RESULT_DATA                                        2
--------------------------------------------------------------------------------------------------------------
Parameter Substitution LR_MSG_CLASS_PARAMETERS                         4
-----------------------------------------------------------------------------------------------------------------
Full Run-Time Trace LR_MSG_CLASS_FULL_TRACE                             8
----------------------------------------------------------------------------------------------------------------
Log on Error LR_MSG_CLASS_JIT_LOG_ON_ERROR                          512
--------------------------------------------------------------------------------------------------------------

Depend upon the value that is retrieved using lr_get_debug_message() we can say the current log settings

Example:
Action()
{

logs_on()
{
lr_set_debug_message(LR_MSG_CLASS_EXTENDED_LOG, LR_SWITCH_ON );
}
-----------------------
-----------------------
-----------------------
void logclear(void)
{
unsigned int log_options = lr_get_debug_message();
lr_set_debug_message(log_options, LR_SWITCH_OFF);
lr_output_message("The current log value is %d",log_options);
return 0;
} }
Answer:

The current log setting value is 16.













LoadRunner Training in Bangalore
LoadRunner Training in Hyderabad
LoadRunner Online Training
LoadRunner Training in BTM
LoadRunner Training in Marathahalli
Best LoadRunner Training Institutes in Bangalore
Best LoadRunner Training Institutes in India
Training Institutes in Bangalore

CONTACT:
8050148265
techvision.lr@gmail.com

No comments:

Post a Comment