Skip to content
logo
Percona Platform
MongoDB logLevel is not default
Initializing search
    portal-doc
    portal-doc
    • Welcome
    • What's new
    • Registration and log in
    • Create and manage organizations
    • Check activity logs
    • Connect your PMM server
    • Advisor checks for PMM
    • Launch PMM environment
    • Network configuration
      • Copyright and licensing information
      • Trademark policy
    • Description
    • Rule
    • Resolution
    • Need more support from Percona?

    MongoDB logLevel is not default¶

    Description¶

    This advisor warns if the verbosity level of MongoDB logs is higher than the default value.

    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.

    Rule¶

    MONGODB_GETPARAMETER

    db.adminCommand( { getParameter: 1, "logLevel": 1 } )

    Resolution¶

    Turn on or adjust the verbosity of your logs:

    • Using the db.setLogLevel() method:

      db.setLogLevel(1);  
      
    • using the adminCommand syntax:

    db.adminCommand( { setParameter: 1, logLevel: 2 } )
    

    Set the following parameter to default:

          setParameter:
           logLevel: 0
    

    Restart the mongod nodes for the changes to take effect. Use the rolling restart method for your cluster or replica set.

    Need more support from Percona?¶

    Subscribe to Percona Platform to get database support with guaranteed SLAs or proactive database management services from the Percona team.

    Learn more

    Contact us

    For free technical help, visit the Percona Community Forum.

    To report bugs or submit feature requests, open a JIRA ticket.

    For paid support and managed or consulting services , contact Percona Sales.

    2024-03-08
    Percona LLC and/or its affiliates, © 2024 Cookie Preferences
    Made with Material for MkDocs