Warning Older Docs! - You are viewing documentation for a previous released version of RhoMobile Suite.

RhoLog Class

Print messages in the log file rholog.txt.

Using JavaScript API

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.

info

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.

error

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.
Back to Top