loadrunner Lr_类函数之 lr_get_debug_message()

lr_get_debug_message()

返回当前消息日志记录设置。

unsigned int lr_get_debug_message();

 

The lr_get_debug_message function returns the current log run-time settings . The settings determine what information is sent output. The log settings are specified with the run-time settings dialog, or by using the lr_set_debug_message function.(lr_get_debug_message函数返回当前日志运行时设置。 设置确定发送什么信息输出。 日志设置使用运行时设置对话框或使用lr_set_debug_message函数指定。)

消息将发送到LoadRunner输出窗口或应用程序管理代理日志文件。

要评估返回的值,可以执行按位AND运算。 这允许您确定设置了哪些选项。 请参见C语法示例。

 

示例:lr_get_debug_message

在以下示例中,lr_get_debug_message函数检索运行时日志记录设置,执行按位操作,并发送相应的消息。

int msg_level

msg_level = lr_get_debug_message();

/ *检查消息级别是否为

“服务器返回的数据”和“参数替换”* /

if((msg_level&LR_MSG_CLASS_RESULT_DATA)

         &&(msg_level&LR_MSG_CLASS_PARAMETERS))

     lr_output_message(“当前消息级别是结果数据和参数。”);

/ *检查标准日志记录* /

if(msg_level&LR_MSG_CLASS_BRIEF_LOG)

     lr_output_message(“Logging is enabled。”);

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章