Skip to content

Commit 8529250

Browse files
author
Ed Costello
committed
DOCS-415 diaglogging: add warning that log is kept open by mongod
Added new glossary entry "diagnostic log" Added new warning cleaned unrelated formatting in configuration-options.txt
1 parent 146d948 commit 8529250

File tree

5 files changed

+38
-11
lines changed

5 files changed

+38
-11
lines changed

source/administration/configuration.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ needed:
342342
Each additional level ``v`` adds additional verbosity to the
343343
logging. The ``verbose`` option is equal to ``v = true``.
344344

345-
- :setting:`diaglog` enables diagnostic logging. Level ``3``
345+
- :setting:`diaglog` enables :term:`diagnostic logging <diagnostic log>`. Level ``3``
346346
logs all read and write options.
347347

348348
- :setting:`objcheck` forces :program:`mongod` to validate all
@@ -352,7 +352,7 @@ needed:
352352
performance.
353353

354354
- :setting:`cpu` forces :program:`mongod` to report the percentage of
355-
the last interval spent in :term:`write-lock`. The interval is
356-
typically 4 seconds, and each output line in the log includes both
357-
the actual interval since the last report and the percentage of
358-
time spent in write lock.
355+
the last interval spent in :term:`write-lock`. The interval is
356+
typically 4 seconds, and each output line in the log includes both
357+
the actual interval since the last report and the percentage of
358+
time spent in write lock.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
.. warning::
3+
4+
Setting the diagnostic level to ``0`` will cause :program:`mongod`
5+
to stop writing data to the :term:`diagnostic log` file, however the
6+
:program:`mongod` instance will continue to keep the file open.
7+
If you want to rename, move, or delete the diagnostic log you must
8+
cleanly shut down the :program:`mongod` instance before doing so.

source/reference/configuration-options.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,11 @@ Settings
269269

270270
*Default:* 0
271271

272-
Creates a very verbose, diagnostic log for troubleshooting and
272+
Creates a very verbose, :term:`diagnostic log` for troubleshooting and
273273
recording various errors. MongoDB writes these log files in the
274-
:setting:`dbpath` in a series of files that begin with the string
275-
``diaglog``.
274+
:setting:`dbpath` directory in a series of files that begin with the string
275+
``diaglog`` with the time logging was initiated appended as a hex
276+
string.
276277

277278
The value of this setting configures the level of
278279
verbosity. Possible values, and their impact are as follows.
@@ -298,6 +299,8 @@ Settings
298299

299300
:setting:`diaglog` is for internal use and not intended for most
300301
users.
302+
303+
.. include:: /includes/warning-diaglogging-off.rst
301304

302305
.. setting:: directoryperdb
303306

source/reference/glossary.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -866,3 +866,16 @@ Glossary
866866
results. The optimizer then uses the query plan each time the
867867
query is run. If a collection changes significantly, the optimizer
868868
creates a new query plan.
869+
870+
diagnostic log
871+
:program:`mongod` can create a verbose log of operations with
872+
the :option:`mongod --diaglog` option or through the
873+
:dbcommand:`diagLogging` command. This log will be created in
874+
the directory specified with the :option:`mongod --dbpath` option
875+
or the default :file:`/data/db` directory. The log file will
876+
be named :file:`diaglog.{time in hex}`, with the time when
877+
logging was initiated appended as a hexadecimal string.
878+
879+
.. include:: /includes/warning-diaglogging-off.rst
880+
881+
.. seealso:: :option:`mongod --diaglog`

source/reference/mongod.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,11 @@ Options
189189

190190
.. option:: --diaglog <value>
191191

192-
Creates a very verbose, diagnostic log for troubleshooting and
192+
Creates a very verbose, :term:`diagnostic log` for troubleshooting and
193193
recording various errors. MongoDB writes these log files in the
194-
:setting:`dbpath` in a series of files that begin with the string
195-
``diaglog``.
194+
:setting:`dbpath` directory in a series of files that begin with the string
195+
``diaglog`` with the time logging was initiated appended as a hex
196+
string.
196197

197198
The specified value configures the level of verbosity. Possible
198199
values, and their impact are as follows.
@@ -219,6 +220,8 @@ Options
219220
:option:`--diaglog` is for internal use and not intended for most
220221
users.
221222

223+
.. include:: /includes/warning-diaglogging-off.rst
224+
222225
.. option:: --directoryperdb
223226

224227
Alters the storage pattern of the data directory to store each

0 commit comments

Comments
 (0)