Skip to main content

Log Output using CLI

To debug ActionScript, you can get logs from the CLI.

In ActionScript, calling a method of the logger object will output the following log to the CLI console.

※ Log subscription is executed when the "Try" button is clicked; no log is output when executing from the API or executing an action.

Subscribe to ActionScript commands and logs

Open the ActionScript edit page and check u_id and p_id.

Specify the subscribe channel by combining the u_id and p_id of the data on the page.

USAGE:
hx logs:actionscript CHANNEL #CHANNEL format = logs_<u_id>_<p_id>

ログを購読する

$ hx logs:actionscript logs_5afeb66813ac8000078354c7_5f52598ae2fb440001214119
Listening for logs...

logger object available in ActionScript

This function is executed when the "Try" button is clicked.

The following 5 log output functions are available in ActionScript:

function main(data) {
logger.debug("debug....");
logger.info("some info");
logger.debug("warning!");
logger.error("ERROR!!!");
logger.log("---- log output ---");
}

After clicking the "Try" button, a log will be output in the CLI console as follows:

[DEBUG] debug....
[INFO] some info
[DEBUG] warning!
[ERROR] ERROR!!!
---- log output ---