ServerJS/System: Difference between revisions

Jump to navigation Jump to search
created a new proposal/log
(created a new proposal/log)
Line 17: Line 17:
The following names have been proposed but not ratified for inclusion in the System proposal.
The following names have been proposed but not ratified for inclusion in the System proposal.


* print: The "system" MAY have a "print" function that accepts a "message" and an optional "label" String.
* print: The "system" MAY have a "print" function that forwards its thisp and arguments to "system.stdout.print" with lazy binding (meaning that, if system.stdout is replaced, print MUST forward to the new stdout).
** The label MAY be one of "log", "warn", "error", "pass", "fail".
 
* log: The "system" MAY have a "log" function that accepts a "message" and an optional "label" String.
** The label MAY be one of "log", "debug", "warn", "error", "pass", "fail".
** Any other, unspecified label MUST be in lower-case and begin with "x" and a vendor-specific label like "x-v8cgi-database".
** Any other, unspecified label MUST be in lower-case and begin with "x" and a vendor-specific label like "x-v8cgi-database".
** '''Counter-argument''' This is infact not printing, but logging. 1) there is lots of logging frameworks, 2) it probably doesn't belong on sys, certainl not called ''print''
*** '''Counter-argument''' However, ''print'' has meant to write a line to stdout in many languages.  That it would frequently be used for logging in non-stdio contexts is not necessarily relevant.


* platform: the "system" MAY contain a string with its vendor-specific platform name.
* platform: the "system" MAY contain a string with its vendor-specific platform name.


* global: the "system" MAY contain a reference to the global object.
* global: the "system" MAY contain a reference to the global object.
== Removed proposals ==
* fs: a file default file system root object conforming to the File System API
* print (proposal A): The "system" MAY have a "print" function that accepts a "message" and an optional "label" String.
** The label MAY be one of "log", "warn", "error", "pass", "fail".
** Any other, unspecified label MUST be in lower-case and begin with "x" and a vendor-specific label like "x-v8cgi-database".
** '''Counter-argument''' This is infact not printing, but logging. 1) there is lots of logging frameworks, 2) it probably doesn't belong on sys, certainl not called ''print''
*** '''Counter-argument''' However, ''print'' has meant to write a line to stdout in many languages.  That it would frequently be used for logging in non-stdio contexts is not necessarily relevant.


= Show of Hands =
= Show of Hands =
Line 42: Line 52:


[[ServerJS/System/ArchivedShowOfHands]]
[[ServerJS/System/ArchivedShowOfHands]]
= Comments =
Removed variables:
* fs: a file default file system root object conforming to the File System API


== Relevant Discussions ==
== Relevant Discussions ==
171

edits

Navigation menu