-
Notifications
You must be signed in to change notification settings - Fork 43
Replace tarantoolctl with tt (CE part) #3706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 8 commits
7d0e470
3e7102a
e7e8481
805808f
229248a
08791a4
ecb5694
50d13b4
5e7a9c8
4ea511f
058ab33
4f6291b
8ac849e
7fdc184
2e007d5
82ac74d
f77a616
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,40 +5,38 @@ Logs | |
================================================================================ | ||
|
||
Tarantool logs important events to a file, e.g. ``/var/log/tarantool/my_app.log``. | ||
To build the log file path, ``tarantoolctl`` takes the instance name, prepends | ||
To build the log file path, ``tt`` takes the instance name, prepends | ||
the instance directory and appends “.log” extension. | ||
|
||
Let’s write something to the log file: | ||
|
||
.. code-block:: console | ||
|
||
$ tarantoolctl enter my_app | ||
/bin/tarantoolctl: connected to unix/:/var/run/tarantool/my_app.control | ||
unix/:/var/run/tarantool/my_app.control> require('log').info("Hello for the manual readers") | ||
--- | ||
... | ||
$ tt connect my_app | ||
• Connecting to the instance... | ||
• Connected to /var/run/tarantool/my_app.control | ||
|
||
/var/run/tarantool/my_app.control> require('log').info("Hello for the manual readers") | ||
|
||
Then check the logs: | ||
|
||
.. code-block:: console | ||
|
||
$ tail /var/log/tarantool/my_app.log | ||
2017-04-04 15:54:04.977 [29255] main/101/tarantoolctl C> version 1.7.3-382-g68ef3f6a9 | ||
2017-04-04 15:54:04.977 [29255] main/101/tarantoolctl C> log level 5 | ||
2017-04-04 15:54:04.978 [29255] main/101/tarantoolctl I> mapping 134217728 bytes for tuple arena... | ||
2017-04-04 15:54:04.985 [29255] iproto/101/main I> binary: bound to [::1]:3301 | ||
2017-04-04 15:54:04.986 [29255] main/101/tarantoolctl I> recovery start | ||
2017-04-04 15:54:04.986 [29255] main/101/tarantoolctl I> recovering from `/var/lib/tarantool/my_app/00000000000000000000.snap' | ||
2017-04-04 15:54:04.988 [29255] main/101/tarantoolctl I> ready to accept requests | ||
2017-04-04 15:54:04.988 [29255] main/101/tarantoolctl I> set 'checkpoint_interval' configuration option to 3600 | ||
2017-04-04 15:54:04.988 [29255] main/101/my_app I> Run console at unix/:/var/run/tarantool/my_app.control | ||
2017-04-04 15:54:04.989 [29255] main/106/console/unix/:/var/ I> started | ||
2017-04-04 15:54:04.989 [29255] main C> entering the event loop | ||
2017-04-04 15:54:47.147 [29255] main/107/console/unix/: I> Hello for the manual readers | ||
2023-09-12 18:13:00.396 [67173] main/111/guard of feedback_daemon/box.feedback_daemon V> metrics_collector restarted | ||
2023-09-12 18:13:00.396 [67173] main/103/-/box.feedback_daemon V> feedback_daemon started | ||
2023-09-12 18:13:00.396 [67173] main/103/- D> memtx_tuple_new_raw_impl(14) = 0x1090077b4 | ||
2023-09-12 18:13:00.396 [67173] main/103/- D> memtx_tuple_new_raw_impl(26) = 0x1090077ec | ||
2023-09-12 18:13:00.396 [67173] main/103/- D> memtx_tuple_new_raw_impl(39) = 0x109007824 | ||
2023-09-12 18:13:00.396 [67173] main/103/- D> memtx_tuple_new_raw_impl(24) = 0x10900785c | ||
2023-09-12 18:13:00.396 [67173] main/103/- D> memtx_tuple_new_raw_impl(39) = 0x109007894 | ||
2023-09-12 18:13:00.396 [67173] main/106/checkpoint_daemon I> scheduled next checkpoint for Tue Sep 12 19:44:34 2023 | ||
2023-09-12 18:13:00.396 [67173] main I> entering the event loop | ||
2023-09-12 18:13:11.656 [67173] main/114/console/unix/:/tarantool I> Hello for the manual readers | ||
|
||
When :ref:`logging to a file <cfg_logging-log>`, the system administrator must ensure logs are | ||
rotated timely and do not take up all the available disk space. With | ||
``tarantoolctl``, log rotation is pre-configured to use ``logrotate`` program, | ||
``tt``, log rotation is pre-configured to use ``logrotate`` program, | ||
which you must have installed. | ||
|
||
File ``/etc/logrotate.d/tarantool`` is part of the standard Tarantool | ||
|
@@ -56,21 +54,21 @@ this file is usually like: | |
delaycompress | ||
create 0640 tarantool adm | ||
postrotate | ||
/usr/bin/tarantoolctl logrotate `basename ${1%%.*}` | ||
/usr/bin/tt logrotate `basename ${1%%.*}` | ||
endscript | ||
} | ||
|
||
If you use a different log rotation program, you can invoke | ||
``tarantoolctl logrotate`` command to request instances to reopen their log | ||
:ref:`tt logrotate <tt-logrotate>` command to request instances to reopen their log | ||
files after they were moved by the program of your choice. | ||
|
||
Tarantool can write its logs to a log file, ``syslog`` or a program specified | ||
in the configuration file (see :ref:`log <cfg_logging-log>` parameter). | ||
|
||
By default, logs are written to a file as defined in ``tarantoolctl`` | ||
defaults. ``tarantoolctl`` automatically detects if an instance is using | ||
By default, logs are written to a file as defined in ``tt`` | ||
defaults. ``tt`` automatically detects if an instance is using | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As I know, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've rechecked this page. Seems like it needs a bigger update. Will rewrite it to reflect the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rewrote the logs page, please check. |
||
``syslog`` or an external program for logging, and does not override the log | ||
destination in this case. In such configurations, log rotation is usually | ||
handled by the external program used for logging. So, | ||
``tarantoolctl logrotate`` command works only if logging-into-file is enabled | ||
``tt logrotate`` command works only if logging-into-file is enabled | ||
in the instance file. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ Notes for operating systems | |
Mac OS | ||
p7nov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
-------------------------------------------------------------------------------- | ||
|
||
On Mac OS, you can administer Tarantool instances only with ``tarantoolctl``. | ||
On Mac OS, you can administer Tarantool instances only with :ref:`tt <tt-cli>`. | ||
p7nov marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Section FreeBSD, lines 22, 32, 28-30:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moved this part to tarantooctl page; no FreeBSD specifics for tt (at least for now). |
||
No native system tools are supported. | ||
|
||
.. _admin-os_notes-freebsd: | ||
|
Uh oh!
There was an error while loading. Please reload this page.