Skip to content

Commit b9ed4f5

Browse files
committed
Logging - update per review
1 parent a18d935 commit b9ed4f5

File tree

2 files changed

+16
-18
lines changed

2 files changed

+16
-18
lines changed

doc/book/admin/logs.rst

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Logs
44
====
55

6-
Each Tarantool instance logs important events to its own log file ``<instance-name>.log``.
6+
Each Tarantool instance logs important events to its own log file.
77
For instances started with :ref:`tt <tt-cli>`, the log location is defined by
88
the ``log_dir`` parameter in the :ref:`tt configuration <tt-config>`.
99
By default, it's ``/var/log/tarantool`` in the ``tt`` :ref:`system mode <tt-config_modes>`,
@@ -43,7 +43,7 @@ Then check the logs:
4343
Log rotation
4444
------------
4545

46-
When :ref:`logging to a file <cfg_logging-log>`, the system administrator must ensure
46+
When :ref:`logging to a file <configuration_reference_log_file>`, the system administrator must ensure
4747
logs are rotated timely and do not take up all the available disk space.
4848
The recommended way to prevent log files from growing infinitely is using an external
4949
log rotation program, for example, ``logrotate``, which is pre-installed on most
@@ -78,22 +78,16 @@ To learn about log rotation in the deprecated ``tarantoolctl`` utility,
7878
check its :ref:`documentation <tarantoolctl-log-rotation>`.
7979

8080

81-
.. _admin-logs-formats:
81+
.. _admin-logs-destination:
8282

83-
Log formats
84-
-----------
83+
Log destination
84+
---------------
8585

86-
Tarantool can write its logs to a log file, to ``syslog``, or to a specified program
87-
through a pipe.
88-
89-
File is the default log format for ``tt``. To send logs to a pipe or ``syslog``,
90-
specify the :ref:`log.to <configuration_reference_log_to>` parameter, for example:
86+
Tarantool can write its logs to a log file, to ``syslog``, or to a specified program through a pipe.
87+
For example, to send logs to ``syslog``, specify the :ref:`log.to <configuration_reference_log_to>` parameter as follows:
9188

9289
.. literalinclude:: /code_snippets/snippets/config/instances.enabled/log_syslog/config.yaml
9390
:language: yaml
9491
:start-at: log:
9592
:end-at: 127.0.0.1:514
9693
:dedent:
97-
98-
In such configurations, log rotation is usually handled by the external program
99-
used for logging.

doc/reference/configuration/configuration_reference.rst

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1909,8 +1909,8 @@ To handle logging in your application, use the :ref:`log module <log-module>`.
19091909

19101910
* ``stderr``: write logs to the standard error stream.
19111911
* ``file``: write logs to a file (see :ref:`log.file <configuration_reference_log_file>`).
1912-
* ``pipe``: start a program and write logs to it (see :ref:`log.pipe <configuration_reference_log_pipe>`).
1913-
* ``syslog``: write audit logs to a system logger (see :ref:`log.syslog.* <configuration_reference_log_syslog>`).
1912+
* ``pipe``: start a program and write logs to its standard input (see :ref:`log.pipe <configuration_reference_log_pipe>`).
1913+
* ``syslog``: write logs to a system logger (see :ref:`log.syslog.* <configuration_reference_log_syslog>`).
19141914

19151915
|
19161916
| Type: string
@@ -1924,6 +1924,7 @@ To handle logging in your application, use the :ref:`log module <log-module>`.
19241924

19251925
Specify a file for logs destination.
19261926
To write logs to a file, you need to set :ref:`log.to <configuration_reference_log_to>` to ``file``.
1927+
Otherwise, ``log.file`` is ignored.
19271928

19281929
**Example**
19291930

@@ -2147,8 +2148,8 @@ To handle logging in your application, use the :ref:`log module <log-module>`.
21472148

21482149
.. confval:: log.pipe
21492150

2150-
Specify a pipe for logs destination.
2151-
To write logs to a pipe, you need to set :ref:`log.to <configuration_reference_log_to>` to ``pipe``.
2151+
Start a program and write logs to its standard input (``stdin``).
2152+
To send logs to a program's standard input, you need to set :ref:`log.to <configuration_reference_log_to>` to ``pipe``.
21522153

21532154
**Example**
21542155

@@ -2203,7 +2204,10 @@ log.syslog.*
22032204
.. confval:: log.syslog.server
22042205

22052206
Set a location of a syslog server.
2206-
This option accepts an IPv4 address or Unix socket path starting with ``unix:``.
2207+
This option accepts one of the following values:
2208+
2209+
* An IPv4 address. Example: ``127.0.0.1:514``.
2210+
* A Unix socket path starting with ``unix:``. Examples: ``unix:/dev/log`` on Linux or ``unix:/var/run/syslog`` on macOS.
22072211

22082212
To write logs to syslog, you need to set :ref:`log.to <configuration_reference_log_to>` to ``syslog``.
22092213

0 commit comments

Comments
 (0)