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。”);