Log
This command is a Flow Command. This command writes a message to a log file.
Log: The message that is being logged.
The log file for the log command is located in your roaming folder found here: C:\Users\YOUR WINDOWS USERNAME HERE\AppData\Roaming\UBot Studio
The log folder can be located at: C:\Users\YOUR WINDOWS USERNAME HERE\AppData\Roaming\UBot Studio\Log
Dated log .txt log files are created to log each script:
Each message logged is also available for viewing through the debugger.
Example
set(#page were on,$scrape attribute(<id="hplogo">,"alt"),"Global") if($comparison(#page were on,"=","Google")) { then { log("Webpage is Google.com") } else { log("Webpage is NOT Google.com") } }
Running the script will scrape the required element, which indicates the webpage the browser is on. Once the element is scraped, it is inserted into the log command through a variable and logged in the log file.
Opening the log file shows the following logs to show that the browser is on the correct webpage:
2015-02-15 13:19:34 [LOG] Webpage is Google.com
Since the browser is not on the expected webpage and the correct element was not detected, the following message is logged on the second run:
2015-02-15 13:19:34 [LOG] Webpage is NOT Google.com