Description
Supported Script Types: Interface Scripts • Client Entity Scripts • Avatar Scripts • Server Entity Scripts • Assignment Client Scripts
Theconsole
API provides program logging facilities.Methods
Name | Return Value | Summary |
---|---|---|
assert
|
None |
Logs an "ERROR" message to the program log and triggers Script.errorMessage, if a test condition fails. The message logged is "ERROR - Assertion failed : " followed by the message values separated by spaces. Note: Script execution continues whether or not the test condition fails. |
clear
|
None |
Clears the Developer > Scripting > Script Log debug window. |
debug
|
None |
Logs a message to the program log and triggers Script.printedMessage. The message logged is the message values separated by spaces. |
error
|
None |
Logs an "ERROR" message to the program log and triggers Script.errorMessage. The message logged is "ERROR - " followed by the message values separated by spaces. |
exception
|
None |
A synonym of console.error. Logs an "ERROR" message to the program log and triggers Script.errorMessage. The message logged is "ERROR - " followed by the message values separated by spaces. |
group
|
None |
Logs a message to the program log and triggers Script.printedMessage, then starts indenting subsequent console.log messages until a console.groupEnd. Groups may be nested. |
groupCollapsed
|
None |
Has the same behavior as console.group. Logs a message to the program log and triggers Script.printedMessage, then starts indenting subsequent console.log messages until a console.groupEnd. Groups may be nested. |
groupEnd
|
None |
Finishes a group of indented console.log messages. |
info
|
None |
Logs an "INFO" message to the program log and triggers Script.infoMessage. The message logged is "INFO -" followed by the message values separated by spaces. |
log
|
None |
Logs a message to the program log and triggers Script.printedMessage. The message logged is the message values separated by spaces. If a console.group is in effect, the message is indented by an amount proportional to the group level. |
time
|
None |
Starts a timer, logs a message to the program log, and triggers Script.printedMessage. The message logged has the timer name and "Timer started". |
timeEnd
|
None |
Finishes a timer, logs a message to the program log, and triggers Script.printedMessage. The message logged has the timer name and the number of milliseconds since the timer was started. |
trace
|
None |
Logs the JavaScript call stack at the point of call to the program log. |
warn
|
None |
Logs a "WARNING" message to the program log and triggers Script.warningMessage. The message logged is "WARNING - " followed by the message values separated by spaces. |
Method Details
(static) assert( assertion, …messageopt ) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Logs an "ERROR" message to the program log and triggers Script.errorMessage, if a test condition fails. The message logged is "ERROR - Assertion failed : " followed by the message values separated by spaces. Note: Script execution continues whether or not the test condition fails. Parameters
Example
|
(static) clear( ) |
---|
Clears the Developer > Scripting > Script Log debug window. |
(static) debug( …messageopt ) | ||||||||
---|---|---|---|---|---|---|---|---|
Logs a message to the program log and triggers Script.printedMessage. The message logged is the message values separated by spaces. Parameters
|
(static) error( …messageopt ) | ||||||||
---|---|---|---|---|---|---|---|---|
Logs an "ERROR" message to the program log and triggers Script.errorMessage. The message logged is "ERROR - " followed by the message values separated by spaces. Parameters
|
(static) exception( …messageopt ) | ||||||||
---|---|---|---|---|---|---|---|---|
A synonym of console.error. Logs an "ERROR" message to the program log and triggers Script.errorMessage. The message logged is "ERROR - " followed by the message values separated by spaces. Parameters
|
(static) group( message ) | ||||||
---|---|---|---|---|---|---|
Logs a message to the program log and triggers Script.printedMessage, then starts indenting subsequent console.log messages until a console.groupEnd. Groups may be nested. Parameters
Example
|
(static) groupCollapsed( message ) | ||||||
---|---|---|---|---|---|---|
Has the same behavior as console.group. Logs a message to the program log and triggers Script.printedMessage, then starts indenting subsequent console.log messages until a console.groupEnd. Groups may be nested. Parameters
|
(static) groupEnd( ) |
---|
Finishes a group of indented console.log messages. |
(static) info( …messageopt ) | ||||||||
---|---|---|---|---|---|---|---|---|
Logs an "INFO" message to the program log and triggers Script.infoMessage. The message logged is "INFO -" followed by the message values separated by spaces. Parameters
|
(static) log( …messageopt ) | ||||||||
---|---|---|---|---|---|---|---|---|
Logs a message to the program log and triggers Script.printedMessage. The message logged is the message values separated by spaces. If a console.group is in effect, the message is indented by an amount proportional to the group level. Parameters
Example
|
(static) time( name ) | ||||||
---|---|---|---|---|---|---|
Starts a timer, logs a message to the program log, and triggers Script.printedMessage. The message logged has the timer name and "Timer started". Parameters
Example
|
(static) timeEnd( name ) | ||||||
---|---|---|---|---|---|---|
Finishes a timer, logs a message to the program log, and triggers Script.printedMessage. The message logged has the timer name and the number of milliseconds since the timer was started. Parameters
|
(static) trace( ) |
---|
Logs the JavaScript call stack at the point of call to the program log. |
(static) warn( …messageopt ) | ||||||||
---|---|---|---|---|---|---|---|---|
Logs a "WARNING" message to the program log and triggers Script.warningMessage. The message logged is "WARNING - " followed by the message values separated by spaces. Parameters
|