Cannot set driver loggerLevel from options

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Minor - P4
    • 2.1.20
    • Affects Version/s: 2.1.8
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Trying to change the driver log level appears to be impossible from the options object. It would be valuable to expose driver log level in mongo client options.

      If mongo_client is created with options:
      { server: { loggerLevel: 'debug' }}
      the options are swallowed at https://github.com/mongodb/node-mongodb-native/blob/2.1/lib/mongo_client.js#L260

      A workaround is running the following line before initializing the driver, but it's a bit hackish:
      require('mongodb-core/lib/connection/logger')('dummy',

      { loggerLevel: 'debug' }

      );

            Assignee:
            Christian Amor Kvalheim
            Reporter:
            Matthew Mason
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: