Share this page

# lr.log

Sends a message to the log file of the Vuser.

    void lr.log ( String message);

Message Functions | Java Syntax

## Arguments

Name | Comments
--- | ---
message | A string containing the message to send to the log.

The lr.log function sends a message to the log file, and not to the Controller output window. Use this function instead of lr_message to conserve the network resources required for sending messages to the output.

This function is identical to lr.log_message, except it inserts a quotation mark at the beginning of the string, enabling VuGen to display it in green in the output window.

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("a message") | "a message"
lr.output_message("message"); | Action(4): a message

## Return Values

No value is returned.

## Parameterization

You cannot use standard parameterization for any arguments in this function.

## Examples

In the following examples, lr.log function sends messages to the log files.

### Example 1 - Sending a Simple Message

    lr.log("Accessing Talk Forum ORB...");

### Example 2 - Sending Strings, Longs, and Other Data Types

    String str = "Test"
    long lg = 100
    lr.log("The value of str = " + str + ".")
    lr.log("The value of lg is " + cstr(lg) + "." )

### Example3 - Sending the Output of a Function Call

    lr.log("Chat Population = " + cstr(orChatForum.count()) )
    lr.log "Last Chat Name = " +orChatForum.LastSubmitName()

Tips to improve your search results... VuGen Function Reference Version 26.1 Function Reference 26.1 All View Local Help Center View Online Help Center Version: