# HG changeset patch # User Yaroslav Zhuravlev # Date 1696321889 -3600 # Node ID 3a85326ed38cfad60a859f35d37fab9dd05a61d5 # Parent c0a4a4a55e450882e5573e1d950b0505960b196c Documented Console object in njs Reference. diff -r c0a4a4a55e45 -r 3a85326ed38c xml/en/docs/njs/changes.xml --- a/xml/en/docs/njs/changes.xml Fri Sep 29 20:06:59 2023 +0100 +++ b/xml/en/docs/njs/changes.xml Tue Oct 03 09:31:29 2023 +0100 @@ -9,7 +9,7 @@
@@ -5087,8 +5087,10 @@ Feature: -console.time() and -console.timeEnd() methods. +console.time() +and +console.timeEnd() +methods. diff -r c0a4a4a55e45 -r 3a85326ed38c xml/en/docs/njs/compatibility.xml --- a/xml/en/docs/njs/compatibility.xml Fri Sep 29 20:06:59 2023 +0100 +++ b/xml/en/docs/njs/compatibility.xml Tue Oct 03 09:31:29 2023 +0100 @@ -9,7 +9,7 @@
@@ -981,6 +981,17 @@ +console +(0.8.2): +error, +info, +log, +time, +timeEnd, +warn + + + crypto (0.7.0): getRandomValues, diff -r c0a4a4a55e45 -r 3a85326ed38c xml/en/docs/njs/reference.xml --- a/xml/en/docs/njs/reference.xml Fri Sep 29 20:06:59 2023 +0100 +++ b/xml/en/docs/njs/reference.xml Tue Oct 03 09:31:29 2023 +0100 @@ -9,7 +9,7 @@
+ rev="118">
@@ -1840,6 +1840,72 @@
+
+ + + + + + + + + +
console.error()
console.info()
console.log()
console.time()
console.timeEnd()
console.warn()
+
+ + +The console object is available +in nginx since 0.8.2, +in CLI since 0.2.6. + + +console.error(msg[, msg2 ...]) + +Outputs one or more error messages. +The message may be a string or an object. + + +console.info(msg[, msg2 ...]) + +Outputs one or more info messages. +The message may be a string or an object. + + +console.log(msg[, msg2 ...]) + +Outputs one or more log messages. +The message may be a string or an object. + + +console.time(label) + +Starts a timer that can track how long an operation takes. +The label parameter allows naming different timers. +If console.timeEnd() +with the same name is called, +the time that elapsed since the timer was started will be output, +in milliseconds. + + +console.timeEnd(label) + +Stops a timer previously started by +console.time() +The label parameter allows naming different timers. + + +console.warn(msg[, msg2 ...]) + +Outputs one or more warning messages. +The message may be a string or an object. + + + + + +
+ +
diff -r c0a4a4a55e45 -r 3a85326ed38c xml/ru/docs/njs/compatibility.xml --- a/xml/ru/docs/njs/compatibility.xml Fri Sep 29 20:06:59 2023 +0100 +++ b/xml/ru/docs/njs/compatibility.xml Tue Oct 03 09:31:29 2023 +0100 @@ -9,7 +9,7 @@
@@ -981,6 +981,17 @@ +console +(0.8.2): +error, +info, +log, +time, +timeEnd, +warn + + + crypto (0.7.0): getRandomValues,