Print messages in the log file rholog.txt.
You can call the RhoLog methods from JavaScript as well as Ruby. To use the JavaScript API, add the public/js/rho_javascript_api.js
file – created at build time as part of the application package – to the .html, .erb, or .js file calling the JavaScript method.
You must enable JavaScript by putting rho-javascript
into extensions in your build.yml.
extensions: ["rho-javascript"]
You must have a RhoElements license to use the JavaScript API.
Print an information message in the rholog.txt file.
Ruby syntax:
info(category, message)
JavaScript syntax:
Rho.RhoLog.info(category, message)
category |
String. Category of the informational message. |
message |
String. The informational message to show in rholog.txt. |
Print an error message in the rholog.txt file. The message will have an “ERROR” prefix.
Ruby syntax:
error(category, message)
JavaScript syntax:
Rho.RhoLog.error(category, message)
category |
String. Category of the error message. |
message |
String. The error message to show in rholog.txt. |