Debian Codegraph @

doc/source/reference/commands/log_reopen.rst

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