|Description||Generate a log associated with the connection or request and viewed within the Virtual Service > Client Log page. A log field is created called datascript_log, containing the DataScript’s name and the output of the avi.vs.log command. If avi.vs.log is called multiple times, the output of each invocation goes in the same datascript_log field in the client log.|
|Parameter||Logs may contain any arbitrary combination of string, number, Boolean and nil values.|
|Example|| From DataScript "Log1" HTTP_REQ event:
From DataScript "Log2" HTTP_RESP event:
Output from the client log:
DataScript Log: [string "Log1"]:1: Hello World! DataScript Log: [string "Log2"]:1: Hello 2 You!
Note: The logs are prefixed by meta information, which is generally the function name and line number calling avi.vs.log(). When the call is not made from a function, the name is the name of the script (in our example, the script is a string, not a file, named Log1).