1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
.. -*- rst -*-
``log_reopen``
==============
Summary
-------
``log_reopen`` is a command that reloads log files.
It is used to reload log files such as groonga log or query log which
are specified by ``--log-path`` or ``--query-log-path`` options.
.. note::
This command only works when the number of worker processes is
equal to 1. Thus, it means that if you use
:doc:`/reference/executables/groonga-httpd` with 2 or more
workers, you must use ``groonga-httpd -s reopen`` instead.
Syntax
------
This command takes no parameters::
log_reopen
Usage
-----
::
log_reopen
[true]
Lotate log files with `log_reopen`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1. Rename target log files such as mv command.
(Log content is still written into moved log files)
2. Execute ``log_reopen`` command.
3. New log file is created as same as existing log file name.
newer log content is written to new log file.
Parameters
----------
There is no required parameter.
Return value
------------
The command returns ``true`` as body if the command succeeds such as::
[HEADER, true]
The command returns ``false`` otherwise such as::
[HEADER, false]
See also
--------
:doc:`log_level`
:doc:`log_put`
|