Skip to content

Rate this page
☆ ☆ ☆ ☆ ☆
Thanks for your feedback
Thank you! The feedback has been submitted.

Get free database assistance or contact our experts for personalized support.

MongoDB logLevel is not default

Description

This advisor warns if the verbosity level of MongoDB logs is higher than the default value. It reports only a non-zero level that is set explicitly, in setParameter.logLevel or systemLog.verbosity; a mongod that does not set one is not reported.

The verbosity level is controlled by the logLevel parameter. Its value is an integer between 0 and 5, where 0 is the default log level (Informational) and 5 is the most verbose level.

Increasing the verbosity of log messages is useful for debugging purposes for a short period of time.

For more information, see db.setLogLevel() in the MongoDB documentation.

Resolution

The check reads the options mongod was started with, so changing the log level at runtime with db.setLogLevel() or setParameter doesn’t clear the finding.

To return to the default log level:

  1. In the configuration file, remove setParameter.logLevel and systemLog.verbosity, or set them to 0. Also remove --setParameter logLevel and -v options from the mongod command line.
  2. Restart the mongod nodes for the change to take effect. For a cluster or replica set, use the rolling restart method.

Need more support from Percona?

Percona experts bring years of experience in tackling tough database performance issues and design challenges.