Difference between revisions of "Bot Playground/Built-in Functions/console.log"
From SmartBots Developers Docs
Line 15: | Line 15: | ||
{{API Variables Table End}} | {{API Variables Table End}} | ||
+ | |||
+ | == Important notice == | ||
+ | |||
+ | Since logs are being saved in asynchronous way, '''consecutive''' console.log() may shuffle: | ||
+ | |||
+ | <syntaxhighlight lang="javascript"> | ||
+ | console.log("line 1"); | ||
+ | console.log("line 2"); | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | generate | ||
+ | |||
+ | 13/6/2016 22:25:50 | ||
+ | line 2 | ||
+ | 13/6/2016 22:25:50 | ||
+ | line 1 | ||
+ | |||
+ | We will workaround this as soon as possible. | ||
== Examples == | == Examples == |
Revision as of 19:31, 13 July 2016
Logs data to the runtime log. Read more about runtime logs.
console.log(...arguments);
Reference
This command accepts the following parameters:
Variable | Required | Description
| |
---|---|---|---|
Input: | |||
...arguments | yes | any number of arguments to be logged to the log. Objects can be translated to a string using JSON.stringify() | |
Output: | |||
result | This function does not return anything |
Important notice
Since logs are being saved in asynchronous way, consecutive console.log() may shuffle:
console.log("line 1");
console.log("line 2");
generate
13/6/2016 22:25:50 line 2 13/6/2016 22:25:50 line 1
We will workaround this as soon as possible.