logn is an in-build function of Apache JMeter and its type is ‘Information’. The logn function writes a message in the console along with the input string value. Irrespective of the log function, it prints the input string only in the console window. By the way, JMeter in-build functions are divided into eight categories which are:
- Information
- Input
- Calculation
- Formatting
- Scripting
- Properties
- Variables
- Strings
Syntax: ${__logn(Message)}
Type: Information
Purpose: To print the message in the console window.
Input Argument: The logn function has 3 arguments among them 2 are optional:
- String to be logged (and returned): It represents a message that you want to print in the console window
- Log Level: The following are the log levels:
- OUT
- ERR
- DEBUG
- INFO (default)
- WARN
- ERROR
- Throwable text: It is an optional input parameter. If the string is non-empty then a throwable string can be returned to understand the exact error. It is similar to the Throwable class concept of Java.
Return Value: This function returns the message string to print in the console window.
Related Functions:
You may be interested: