ServerJS/API/console: Difference between revisions
Jump to navigation
Jump to search
(Added a preliminary proposal for the console module API.) |
mNo edit summary |
||
| Line 1: | Line 1: | ||
The "console" top-level module must be available in all platforms. The module must provide the following exports: | The "console" top-level module must be available in all platforms. The module must provide the following exports: | ||
; log(message | ; log(message) : logs a message | ||
; info(message) : logs an informational message | ; info(message) : logs an informational message | ||
; warn(message) : logs a warning message | ; warn(message) : logs a warning message | ||
| Line 8: | Line 8: | ||
; pass(name) : logs the success of a test | ; pass(name) : logs the success of a test | ||
; fail(name) : logs the failure of a test | ; fail(name) : logs the failure of a test | ||
; print(message, [level]): logs a message. The level may be any of "log", "info", "warn", "error", "debug", "pass", "fail", null, or undefined. Other labels beginning with "x" and a platform-specific identifier are reserved for the corresponding platform. | |||
Messages may be any reference. Names must be strings. | |||
Revision as of 05:22, 14 April 2009
The "console" top-level module must be available in all platforms. The module must provide the following exports:
- log(message)
- logs a message
- info(message)
- logs an informational message
- warn(message)
- logs a warning message
- error(message)
- logs an error message
- debug(message)
- logs a debug message
- pass(name)
- logs the success of a test
- fail(name)
- logs the failure of a test
- print(message, [level])
- logs a message. The level may be any of "log", "info", "warn", "error", "debug", "pass", "fail", null, or undefined. Other labels beginning with "x" and a platform-specific identifier are reserved for the corresponding platform.
Messages may be any reference. Names must be strings.
Prior Art
- Firebug
- Safari 1.3 Console
- Opera JavaScript Console
- Internet Explorer 8 JavaScript Console