Skip to content

Commit a90ffcc

Browse files
committed
Logging administration
1 parent fb27fa1 commit a90ffcc

File tree

1 file changed

+22
-20
lines changed

1 file changed

+22
-20
lines changed

doc/book/admin/logs.rst

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,29 @@ To check how logging works, write something to the log using the :ref:`log <log-
1414

1515
.. code-block:: console
1616
17-
$ tt connect my_app
17+
$ tt connect application
1818
• Connecting to the instance...
19-
• Connected to /var/run/tarantool/my_app.control
19+
• Connected to application
2020
21-
/var/run/tarantool/my_app.control> require('log').info("Hello for the manual readers")
21+
application> require('log').info("Hello for the manual readers")
22+
---
23+
...
2224
2325
Then check the logs:
2426

2527
.. code-block:: console
2628
27-
$ tail /var/log/tarantool/my_app.log
28-
2023-09-12 18:13:00.396 [67173] main/111/guard of feedback_daemon/box.feedback_daemon V> metrics_collector restarted
29-
2023-09-12 18:13:00.396 [67173] main/103/-/box.feedback_daemon V> feedback_daemon started
30-
2023-09-12 18:13:00.396 [67173] main/103/- D> memtx_tuple_new_raw_impl(14) = 0x1090077b4
31-
2023-09-12 18:13:00.396 [67173] main/103/- D> memtx_tuple_new_raw_impl(26) = 0x1090077ec
32-
2023-09-12 18:13:00.396 [67173] main/103/- D> memtx_tuple_new_raw_impl(39) = 0x109007824
33-
2023-09-12 18:13:00.396 [67173] main/103/- D> memtx_tuple_new_raw_impl(24) = 0x10900785c
34-
2023-09-12 18:13:00.396 [67173] main/103/- D> memtx_tuple_new_raw_impl(39) = 0x109007894
35-
2023-09-12 18:13:00.396 [67173] main/106/checkpoint_daemon I> scheduled next checkpoint for Tue Sep 12 19:44:34 2023
36-
2023-09-12 18:13:00.396 [67173] main I> entering the event loop
37-
2023-09-12 18:13:11.656 [67173] main/114/console/unix/:/tarantool I> Hello for the manual readers
29+
$ tail instances.enabled/application/var/log/instance001/tt.log
30+
2024-04-09 17:34:29.489 [49502] main/106/gc I> wal/engine cleanup is resumed
31+
2024-04-09 17:34:29.489 [49502] main/104/interactive/box.load_cfg I> set 'instance_name' configuration option to "instance001"
32+
2024-04-09 17:34:29.489 [49502] main/104/interactive/box.load_cfg I> set 'custom_proc_title' configuration option to "tarantool - instance001"
33+
2024-04-09 17:34:29.489 [49502] main/104/interactive/box.load_cfg I> set 'log_nonblock' configuration option to false
34+
2024-04-09 17:34:29.489 [49502] main/104/interactive/box.load_cfg I> set 'replicaset_name' configuration option to "replicaset001"
35+
2024-04-09 17:34:29.489 [49502] main/104/interactive/box.load_cfg I> set 'listen' configuration option to [{"uri":"127.0.0.1:3301"}]
36+
2024-04-09 17:34:29.489 [49502] main/107/checkpoint_daemon I> scheduled next checkpoint for Tue Apr 9 19:08:04 2024
37+
2024-04-09 17:34:29.489 [49502] main/104/interactive/box.load_cfg I> set 'metrics' configuration option to {"labels":{"alias":"instance001"},"include":["all"],"exclude":[]}
38+
2024-04-09 17:34:29.489 [49502] main I> entering the event loop
39+
2024-04-09 17:34:38.905 [49502] main/116/console/unix/:/tarantool I> Hello for the manual readers
3840
3941
.. _admin-logs-rotation:
4042

@@ -85,13 +87,13 @@ Tarantool can write its logs to a log file, to ``syslog``, or to a specified pro
8587
through a pipe.
8688

8789
File is the default log format for ``tt``. To send logs to a pipe or ``syslog``,
88-
specify the :ref:`box.cfg.log <cfg_logging-log>` parameter, for example:
90+
specify the :ref:`log.to <configuration_reference_log_to>` parameter, for example:
8991

90-
.. code-block:: lua
91-
92-
box.cfg{log = '| cronolog tarantool.log'}
93-
-- or
94-
box.cfg{log = 'syslog:identity=tarantool,facility=user'}
92+
.. literalinclude:: /code_snippets/snippets/config/instances.enabled/log_syslog/config.yaml
93+
:language: yaml
94+
:start-at: log:
95+
:end-at: 127.0.0.1:514
96+
:dedent:
9597

9698
In such configurations, log rotation is usually handled by the external program
9799
used for logging.

0 commit comments

Comments
 (0)