|
21 | 21 | * 6 – ``VERBOSE``
|
22 | 22 | * 7 – ``DEBUG``
|
23 | 23 |
|
24 |
| - By setting ``log_level``, you can enable logging of all classes below |
25 |
| - or equal to the given level. Tarantool prints its logs to the standard |
| 24 | + By setting ``log_level``, you can enable logging of all events with severities above |
| 25 | + or equal to the given level. Tarantool prints logs to the standard |
26 | 26 | error stream by default, but this can be changed with the
|
27 | 27 | :ref:`log <cfg_logging-log>` configuration parameter.
|
28 | 28 |
|
|
42 | 42 |
|
43 | 43 | Since version 1.7.4.
|
44 | 44 | By default, Tarantool sends the log to the standard error stream
|
45 |
| - (``stderr``). If ``log`` is specified, Tarantool can send the log to ... |
| 45 | + (``stderr``). If ``log`` is specified, Tarantool can send the log to a ... |
46 | 46 |
|
47 |
| - * a file; |
| 47 | + * file; |
48 | 48 |
|
49 |
| - * a pipe; |
| 49 | + * pipe; |
50 | 50 |
|
51 |
| - * the system logger. |
| 51 | + * system logger. |
52 | 52 |
|
53 |
| - The example below shows how to send the log to the ``tarantool.log`` file: |
| 53 | + The example below shows how to send logs to the ``tarantool.log`` file: |
54 | 54 |
|
55 | 55 | .. code-block:: lua
|
56 | 56 |
|
|
95 | 95 | The setting can be 'syslog:', 'syslog:facility=...', 'syslog:identity=...',
|
96 | 96 | 'syslog:server=...', or a combination.
|
97 | 97 |
|
98 |
| - * The ``syslog:identity`` setting is an arbitrary string which will be placed at |
99 |
| - the beginning of all messages. The default value is: tarantool. |
| 98 | + * The ``syslog:identity`` setting is an arbitrary string, which is placed at |
| 99 | + the beginning of all messages. The default value is "tarantool". |
100 | 100 |
|
101 | 101 | * The ``syslog:facility`` setting is currently ignored but will be used in the future.
|
102 | 102 | The value must be one of the `syslog <https://en.wikipedia.org/wiki/Syslog>`_
|
|
107 | 107 |
|
108 | 108 | * The ``syslog:server`` setting is the locator for the syslog server.
|
109 | 109 | It can be a Unix socket path beginning with "unix:", or an ipv4 port number.
|
110 |
| - The default socket value is: dev/log (on Linux) or /var/run/syslog (on Mac OS). |
| 110 | + The default socket value is: ``dev/log`` (on Linux) or ``/var/run/syslog`` (on macOS). |
111 | 111 | The default port value is: 514, the UDP port.
|
112 | 112 |
|
113 | 113 | When logging to a file, Tarantool reopens the log on `SIGHUP <https://en.wikipedia.org/wiki/SIGHUP>`_.
|
|
124 | 124 | .. confval:: log_nonblock
|
125 | 125 |
|
126 | 126 | Since version 1.7.4.
|
127 |
| - If ``log_nonblock`` equals true, Tarantool does not block during logging |
| 127 | + If ``log_nonblock`` equals **true**, Tarantool does not block during logging |
128 | 128 | when the system is not ready for writing, and drops the message
|
129 | 129 | instead. If :ref:`log_level <cfg_logging-log_level>` is high, and many
|
130 |
| - messages go to the log, setting ``log_nonblock`` to true may improve |
| 130 | + messages go to the log, setting ``log_nonblock`` to **true** may improve |
131 | 131 | logging performance at the cost of some log messages getting lost.
|
132 | 132 |
|
133 |
| - This parameter has effect only if the output is going to "syslog:" or |
134 |
| - "pipe:". |
| 133 | + This parameter has effect only if :ref:`log <cfg_logging-log>` is |
| 134 | + configured to send logs to a pipe or system logger. |
| 135 | + The default ``log_nonblock`` value is **nil**, which means that |
| 136 | + blocking behavior corresponds to the logger type: |
| 137 | + |
| 138 | + * **false** for ``stderr`` and file loggers. |
| 139 | + |
| 140 | + * **true** for a pipe and system logger. |
135 | 141 |
|
136 |
| - The default ``log_nonblock`` value is nil, which means that |
137 |
| - blocking behavior corresponds to the type of logger. |
138 | 142 | This is a behavior change: in earlier versions of the Tarantool
|
139 |
| - server, the default value was true. |
| 143 | + server, the default value was **true**. |
140 | 144 |
|
141 | 145 | | Type: boolean
|
142 | 146 | | Default: nil
|
|
150 | 154 | Since version 1.6.2.
|
151 | 155 | If processing a request takes longer than the given value (in seconds),
|
152 | 156 | warn about it in the log. Has effect only if :ref:`log_level
|
153 |
| - <cfg_logging-log_level>` is more than or equal to 4 (WARNING). |
| 157 | + <cfg_logging-log_level>` is greater than or equal to 4 (WARNING). |
154 | 158 |
|
155 | 159 | | Type: float
|
156 | 160 | | Default: 0.5
|
|
166 | 170 | * 'plain' (the default), or
|
167 | 171 | * 'json' (with more detail and with JSON labels).
|
168 | 172 |
|
169 |
| - Here is what a log entry looks like after ``box.cfg{log_format='plain'}``: |
| 173 | + Here is what a log entry looks like if ``box.cfg{log_format='plain'}``: |
170 | 174 |
|
171 | 175 | .. code-block:: text
|
172 | 176 |
|
173 | 177 | 2017-10-16 11:36:01.508 [18081] main/101/interactive I> set 'log_format' configuration option to "plain"
|
174 | 178 |
|
175 |
| - Here is what a log entry looks like after ``box.cfg{log_format='json'}``: |
| 179 | + Here is what a log entry looks like if ``box.cfg{log_format='json'}``: |
176 | 180 |
|
177 | 181 | .. code-block:: text
|
178 | 182 |
|
|
186 | 190 | "file": "builtin\/box\/load_cfg.lua",
|
187 | 191 | "line": 317}
|
188 | 192 |
|
189 |
| - The ``log_format='plain'`` entry has time, process id, |
| 193 | + The ``log_format='plain'`` entry has a time value, process ID, |
190 | 194 | cord name, :ref:`fiber_id <fiber_object-id>`,
|
191 | 195 | :ref:`fiber_name <fiber_object-name_get>`,
|
192 | 196 | :ref:`log level <cfg_logging-log_level>`, and message.
|
193 | 197 |
|
194 |
| - The ``log_format='json'`` entry has the same things along with their labels, |
| 198 | + The ``log_format='json'`` entry has the same fields along with their labels, |
195 | 199 | and in addition has the file name and line number of the Tarantool source.
|
196 | 200 |
|
197 | 201 | Setting ``log_format`` to 'json' is illegal if the output is going to "syslog:".
|
|
0 commit comments