@@ -14,27 +14,29 @@ To check how logging works, write something to the log using the :ref:`log <log-
14
14
15
15
.. code-block :: console
16
16
17
- $ tt connect my_app
17
+ $ tt connect application
18
18
• Connecting to the instance...
19
- • Connected to /var/run/tarantool/my_app.control
19
+ • Connected to application
20
20
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
+ ...
22
24
23
25
Then check the logs:
24
26
25
27
.. code-block :: console
26
28
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
38
40
39
41
.. _admin-logs-rotation :
40
42
@@ -85,13 +87,13 @@ Tarantool can write its logs to a log file, to ``syslog``, or to a specified pro
85
87
through a pipe.
86
88
87
89
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:
89
91
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:
95
97
96
98
In such configurations, log rotation is usually handled by the external program
97
99
used for logging.
0 commit comments