lr.log_message

Sends a message to the log.

C#

void lr.log_message( string message );

VB.NET

Sub lr.log_message( ByVal message as String )  
Example: lr.log_messageMessage Functions

Arguments

NameComments
messageA string to send to the log file.

The lr.log_message function sends a message to the Vuser or agent log file (depending on the application), and not to the output window. You can use this function for debugging by sending error or other informational messages to the log file.

You can avoid overloading the network by using this function to send messages to the log file rather than sending messages to the Output window (with lr.error_message or lr.output_message). In a standalone program such as VuGen, lr.log_message sends the message to the viewer and output.txt.

To send a message to the output file, you must enable logging in the runtime settings, and select Always send messages. If you select Send messages only when an error occurs, there is no output from this function.

In the Vuser Execution log, this function does not list the location and line number from where the message was issued. To issue a message with those details, use lr.output_message.

statement

Output

lr.log_message("a message") a message
lr.output_message("a message"); Action(4): a message

Return Values

No value returned.

Parameterization

Standard parameterization is not available for this function.