@@ -31,7 +31,8 @@ The command has the following syntax:
3131
3232 db.adminCommand(
3333 {
34- logRotate: <target>
34+ logRotate: <integer or string>,
35+ comment: <string>
3536 }
3637 )
3738
@@ -44,21 +45,21 @@ The command takes the following fields:
4445 :header-rows: 1
4546 :widths: 20 20 80
4647
47- * - Parameter
48+ * - Field
4849 - Type
4950 - Description
5051
51- * - ``<target> ``
52- - string
52+ * - ``logRotate ``
53+ - integer or string
5354 - The log or logs to rotate, according to the following:
5455
5556 - ``1`` -- Rotates both the server and audit logs
56- - ``server`` -- Rotates only the server log
57- - ``audit`` -- Rotates only the audit log
57+ - ``" server" `` -- Rotates only the server log
58+ - ``" audit" `` -- Rotates only the audit log
5859
5960 * - ``comment``
60- - any
61- - *optional * A message logged by the server to the log file and
61+ - string
62+ - *Optional. * A message logged by the server to the log file and
6263 audit file at time of log rotation.
6364
6465You may also rotate the logs by sending a ``SIGUSR1`` signal to the
@@ -116,11 +117,11 @@ The following example rotates both the server log and the audit log:
116117
117118.. code-block:: javascript
118119
119- db.adminCommand({ logRotate: 1} )
120+ db.adminCommand( { logRotate: 1 } )
120121
121122The following example rotates only the audit log, and provides a custom
122123message to the log file at time of rotation:
123124
124125.. code-block:: javascript
125126
126- db.adminCommand({ logRotate: audit, comment: "Rotating audit log"} )
127+ db.adminCommand( { logRotate: " audit" , comment: "Rotating audit log" } )
0 commit comments