Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-4650

Improve logging documentation

    • 3

      Mongoid logging configuration has some gotchas:

      1. The log output by default is sent to the rails log, not to stdout. Coming from driver development this is still tripping me up.
      2. Mongoid and driver loggers are different entities, and it is not explicitly documented that changing the global driver logger affects already instantiated clients created by Mongoid.
      1. Even though a logger can be set per driver client, in Mongoid the log level option is global.

      It may not be a bad idea to slave driver logging level and configuration to Mongoid when Mongoid is reconfigured from ruby code (vs in config file).

      Further points to investigate and/or document:

      1. If Mongoid is used with a Sinatra app, what is the default log output destination?

            Assignee:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: