Namespace SSB.console
JavaScript Console. Has html viewer, logger, and javascript command prompt.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
To open the console you need to initialize it by invoking
SSB.console.init.
|
| Method Attributes | Method Name and Description |
|---|---|
| <static> {void} |
SSB.console.debug(msg)
Outputs message to logger window with "debug" level
|
| <static> {void} |
SSB.console.error(msg)
Outputs message to logger window with "error" level
|
| <static> {void} |
SSB.console.info(msg)
Outputs message to logger window with "info" level
|
| <static> {void} |
SSB.console.init(logLevel)
Opens console window and sets logger level to logLevel.
|
| <static> {void} |
SSB.console.log(msg)
Outputs message to logger window with "log" level.
|
| <static> {void} |
SSB.console.printValues()
Prints permanent configuration variables to the logger window with "debug" level.
|
Namespace Detail
SSB.console
To open the console you need to initialize it by invoking
SSB.console.init. If SSB.console.init method wasn't invoked the console
won't open and logger commands will be disabled.
The Logger has four log levels with importance order as folows: "debug" < "info" < "error" < "off" mode. The logger will output only these request which have their log levels greater or equal to logger level. That is the smallest level - debug - will include all larger levels and the larger level - off - won't include any other level, actually it will turn off the logger function.
The Logger has four log levels with importance order as folows: "debug" < "info" < "error" < "off" mode. The logger will output only these request which have their log levels greater or equal to logger level. That is the smallest level - debug - will include all larger levels and the larger level - off - won't include any other level, actually it will turn off the logger function.
// initialize console and set logger level to info
BBS.console.init("info");
// This request is enabled, because error >= info
BBS.console.error("You have an error!");
// This request is disabled, because debug < info.
BBS.console.debug("Hello ppl! Wazzup?");
// This request is enabled, because info >= info.
BBS.console.info("Hey where is my objects?");
Method Detail
<static>
{void}
SSB.console.debug(msg)
Outputs message to logger window with "debug" level
- Parameters:
- {String} msg
- Message to output
- Returns:
- {void}
<static>
{void}
SSB.console.error(msg)
Outputs message to logger window with "error" level
- Parameters:
- {String} msg
- Message to output
- Returns:
- {void}
<static>
{void}
SSB.console.info(msg)
Outputs message to logger window with "info" level
- Parameters:
- {String} msg
- Message to output
- Returns:
- {void}
<static>
{void}
SSB.console.init(logLevel)
Opens console window and sets logger level to logLevel. If not invoked the console
window will not open.
- Parameters:
- {String} logLevel
- Logger level to set - "debug"/"info"/"error"/"off"
- Returns:
- {void}
<static>
{void}
SSB.console.log(msg)
Outputs message to logger window with "log" level.
Important note: this method will open the console window and log the message even if it wasn't initialized before, or was initialized with logger "off" level. It works like alert - want you or not it will be outputed. But it has a drawback: If you will write your script with a lot of SSB.console.log() lines for debuging, finally you will need to delete all that rows before releasing your script because you won't be able to disable this command. Therefore this method is deprecated.
Important note: this method will open the console window and log the message even if it wasn't initialized before, or was initialized with logger "off" level. It works like alert - want you or not it will be outputed. But it has a drawback: If you will write your script with a lot of SSB.console.log() lines for debuging, finally you will need to delete all that rows before releasing your script because you won't be able to disable this command. Therefore this method is deprecated.
- Parameters:
- {String} msg
- Message to output
- Deprecated:
- You can not disable logger output on this level.
- Returns:
- {void}
<static>
{void}
SSB.console.printValues()
Prints permanent configuration variables to the logger window with "debug" level.
That is logger should be initialized will "debug" level.
- Returns:
- {void}