Mercurial > hg > nginx-site
comparison xml/en/docs/njs/reference.xml @ 2877:0280b6c71d38
Added note about string length to log methods in njs.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Mon, 08 Aug 2022 16:03:07 +0100 |
parents | b4eb565bbb1f |
children | e59e8645055d |
comparison
equal
deleted
inserted
replaced
2876:d8162f6cee38 | 2877:0280b6c71d38 |
---|---|
7 <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd"> | 7 <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd"> |
8 | 8 |
9 <article name="Reference" | 9 <article name="Reference" |
10 link="/en/docs/njs/reference.html" | 10 link="/en/docs/njs/reference.html" |
11 lang="en" | 11 lang="en" |
12 rev="84"> | 12 rev="85"> |
13 | 13 |
14 <section id="summary"> | 14 <section id="summary"> |
15 | 15 |
16 <para> | 16 <para> |
17 <link doc="index.xml">njs</link> provides objects, methods and properties | 17 <link doc="index.xml">njs</link> provides objects, methods and properties |
109 | 109 |
110 <tag-name id="r_error"><literal>r.error(<value>string</value>)</literal></tag-name> | 110 <tag-name id="r_error"><literal>r.error(<value>string</value>)</literal></tag-name> |
111 <tag-desc> | 111 <tag-desc> |
112 writes a <literal>string</literal> to the error log | 112 writes a <literal>string</literal> to the error log |
113 on the <literal>error</literal> level of logging | 113 on the <literal>error</literal> level of logging |
114 <para> | |
115 <note> | |
116 As nginx has a | |
117 <link doc="../dev/development_guide.xml" id="logging">hardcoded</link> | |
118 maximum line length limit, | |
119 only first 2048 bytes of the string can be logged. | |
120 </note> | |
121 </para> | |
114 </tag-desc> | 122 </tag-desc> |
115 | 123 |
116 <tag-name id="r_finish"><literal>r.finish()</literal></tag-name> | 124 <tag-name id="r_finish"><literal>r.finish()</literal></tag-name> |
117 <tag-desc> | 125 <tag-desc> |
118 finishes sending a response to the client | 126 finishes sending a response to the client |
246 | 254 |
247 <tag-name id="r_log"><literal>r.log(<value>string</value>)</literal></tag-name> | 255 <tag-name id="r_log"><literal>r.log(<value>string</value>)</literal></tag-name> |
248 <tag-desc> | 256 <tag-desc> |
249 writes a <literal>string</literal> to the error log | 257 writes a <literal>string</literal> to the error log |
250 on the <literal>info</literal> level of logging | 258 on the <literal>info</literal> level of logging |
259 <para> | |
260 <note> | |
261 As nginx has a | |
262 <link doc="../dev/development_guide.xml" id="logging">hardcoded</link> | |
263 maximum line length limit, | |
264 only first 2048 bytes of the string can be logged. | |
265 </note> | |
266 </para> | |
251 </tag-desc> | 267 </tag-desc> |
252 | 268 |
253 <tag-name id="r_method"><literal>r.method</literal></tag-name> | 269 <tag-name id="r_method"><literal>r.method</literal></tag-name> |
254 <tag-desc> | 270 <tag-desc> |
255 HTTP method, read-only | 271 HTTP method, read-only |
557 | 573 |
558 <tag-name id="r_warn"><literal>r.warn(<value>string</value>)</literal></tag-name> | 574 <tag-name id="r_warn"><literal>r.warn(<value>string</value>)</literal></tag-name> |
559 <tag-desc> | 575 <tag-desc> |
560 writes a <literal>string</literal> to the error log | 576 writes a <literal>string</literal> to the error log |
561 on the <literal>warning</literal> level of logging | 577 on the <literal>warning</literal> level of logging |
578 <para> | |
579 <note> | |
580 As nginx has a | |
581 <link doc="../dev/development_guide.xml" id="logging">hardcoded</link> | |
582 maximum line length limit, | |
583 only first 2048 bytes of the string can be logged. | |
584 </note> | |
585 </para> | |
562 </tag-desc> | 586 </tag-desc> |
563 | 587 |
564 </list> | 588 </list> |
565 </para> | 589 </para> |
566 | 590 |
640 | 664 |
641 <tag-name id="s_error"><literal>s.error(<value>string</value>)</literal></tag-name> | 665 <tag-name id="s_error"><literal>s.error(<value>string</value>)</literal></tag-name> |
642 <tag-desc> | 666 <tag-desc> |
643 writes a sent <literal>string</literal> to the error log | 667 writes a sent <literal>string</literal> to the error log |
644 on the <literal>error</literal> level of logging | 668 on the <literal>error</literal> level of logging |
669 <para> | |
670 <note> | |
671 As nginx has a | |
672 <link doc="../dev/development_guide.xml" id="logging">hardcoded</link> | |
673 maximum line length limit, | |
674 only first 2048 bytes of the string can be logged. | |
675 </note> | |
676 </para> | |
645 </tag-desc> | 677 </tag-desc> |
646 | 678 |
647 <tag-name id="s_log"><literal>s.log(<value>string</value>)</literal></tag-name> | 679 <tag-name id="s_log"><literal>s.log(<value>string</value>)</literal></tag-name> |
648 <tag-desc> | 680 <tag-desc> |
649 writes a sent <value>string</value> to the error log | 681 writes a sent <value>string</value> to the error log |
652 | 684 |
653 <tag-name id="s_off"><literal>s.off(<value>eventName</value>)</literal></tag-name> | 685 <tag-name id="s_off"><literal>s.off(<value>eventName</value>)</literal></tag-name> |
654 <tag-desc> | 686 <tag-desc> |
655 unregisters the callback set by the <link id="s_on">s.on()</link> method | 687 unregisters the callback set by the <link id="s_on">s.on()</link> method |
656 (<link doc="changes.xml" id="njs0.2.4">0.2.4</link>) | 688 (<link doc="changes.xml" id="njs0.2.4">0.2.4</link>) |
689 <para> | |
690 <note> | |
691 As nginx has a | |
692 <link doc="../dev/development_guide.xml" id="logging">hardcoded</link> | |
693 maximum line length limit, | |
694 only first 2048 bytes of the string can be logged. | |
695 </note> | |
696 </para> | |
657 </tag-desc> | 697 </tag-desc> |
658 | 698 |
659 <tag-name id="s_on"><literal>s.on(<value>event</value>, | 699 <tag-name id="s_on"><literal>s.on(<value>event</value>, |
660 <value>callback</value>)</literal></tag-name> | 700 <value>callback</value>)</literal></tag-name> |
661 <tag-desc> | 701 <tag-desc> |
788 | 828 |
789 <tag-name id="s_warn"><literal>s.warn(<value>string</value>)</literal></tag-name> | 829 <tag-name id="s_warn"><literal>s.warn(<value>string</value>)</literal></tag-name> |
790 <tag-desc> | 830 <tag-desc> |
791 writes a sent <literal>string</literal> to the error log | 831 writes a sent <literal>string</literal> to the error log |
792 on the <literal>warning</literal> level of logging | 832 on the <literal>warning</literal> level of logging |
833 <para> | |
834 <note> | |
835 As nginx has a | |
836 <link doc="../dev/development_guide.xml" id="logging">hardcoded</link> | |
837 maximum line length limit, | |
838 only first 2048 bytes of the string can be logged. | |
839 </note> | |
840 </para> | |
793 </tag-desc> | 841 </tag-desc> |
794 | 842 |
795 </list> | 843 </list> |
796 </para> | 844 </para> |
797 | 845 |
974 the <value>message</value> parameter can be a string or Buffer. | 1022 the <value>message</value> parameter can be a string or Buffer. |
975 The following log levels can be specified: | 1023 The following log levels can be specified: |
976 <literal>ngx.INFO</literal>, | 1024 <literal>ngx.INFO</literal>, |
977 <literal>ngx.WARN</literal>, and | 1025 <literal>ngx.WARN</literal>, and |
978 <literal>ngx.ERR</literal>. | 1026 <literal>ngx.ERR</literal>. |
1027 <para> | |
1028 <note> | |
1029 As nginx has a | |
1030 <link doc="../dev/development_guide.xml" id="logging">hardcoded</link> | |
1031 maximum line length limit, | |
1032 only first 2048 bytes of the string can be logged. | |
1033 </note> | |
1034 </para> | |
979 </tag-desc> | 1035 </tag-desc> |
980 | 1036 |
981 </list> | 1037 </list> |
982 </para> | 1038 </para> |
983 | 1039 |