Skip to content

Commit 17d84f6

Browse files
author
Ed Costello
committed
DOCS-46 incorporate edits and rst formatting from @tycoish
1 parent 195bf9a commit 17d84f6

File tree

1 file changed

+22
-16
lines changed

1 file changed

+22
-16
lines changed

source/reference/command/logRotate.txt

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ logRotate
66

77
.. dbcommand:: logRotate
88

9-
:dbcommand:`logRotate` is an :term:`admin database` command that allows you to rotate
10-
the MongoDB logs. Use the following syntax: ::
9+
:dbcommand:`logRotate` is an :term:`admin database` command that
10+
allows you to rotate
11+
the MongoDB logs. Use the following syntax:
12+
13+
.. code-block:: javascript
1114

1215
{ logRotate: 1 }
1316

@@ -16,27 +19,30 @@ logRotate
1619
Your :program:`mongod` instance needs to be running with the
1720
:option:`--logpath [file] <mongod --logpath>` option.
1821

19-
You may also rotate the logs by sending a ``SIGUSR1`` signal to the :program:`mongod` process.
20-
If your :program:`mongod` has a process ID of 2200, here's how to send the signal on Linux:
22+
You may also rotate the logs by sending a ``SIGUSR1`` signal to the
23+
:program:`mongod` process.
24+
If your :program:`mongod` has a process ID of 2200, here's how to
25+
send the signal on Linux:
2126

2227
.. code-block:: sh
2328

2429
kill -SIGUSR1 2200
2530

26-
27-
:dbcommand:`logRotate` will cause the existing log file to be renamed
28-
by appending the current timestamp to the filename. A new log file will be created
29-
with the name which was specified by the :option:`--logpath` option to :program:`mongod`
30-
or :program:`mongos`.
31-
The rotated files will have a timestamp of the form yyyy-mm-ddThh-mm-ss
31+
:dbcommand:`logRotate` will cause the existing log file to be
32+
renamed by appending the current timestamp to the filename.
33+
The rotated files will have a timestamp of the form
34+
<YYYY>-<mm>-<DD>T<HH>-<MM>-<SS>
3235
appended to the filename.
33-
36+
A new log file will be created
37+
with the name which was specified by the
38+
:setting:`--logpath` runtime option to :program:`mongod`
39+
or :program:`mongos`.
3440

3541
.. note::
3642

37-
.. versionadded::2.0.3
38-
39-
The :dbcommand:`logRotate` command is available to mongod instances
40-
running on Windows systems with MongoDB release 2.0.3 and higher.
43+
.. versionadded:: 2.0.3
44+
The :dbcommand:`logRotate` command is available to
45+
:program:`mongod` instances running on Windows systems with
46+
MongoDB release 2.0.3 and higher.
4147

42-
.. 16175 thrown if rotatelogs fails
48+
.. :error:`16175` is thrown if logRotate fails

0 commit comments

Comments
 (0)