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

Mongoid.config.logger busted

    • Type: Icon: Task Task
    • Resolution: Done
    • 2.3.2
    • Affects Version/s: None
    • Component/s: None

      I think that Logger should be ::Logger.

       ruby
      def logger=(logger)
        case logger
          when Logger then @logger = logger
          when false, nil then @logger = nil
        end
      end
      

      Otherwise you can't set it:

      >> Mongoid.logger
      #<ActiveSupport::BufferedLogger:0x3e99d48 @buffer={}, @guard=#<Mutex:0x3e99be0>, @log=#<File:/app/log/development.log>, @auto_flushing=1, @level=0>
      >> Mongoid.logger = Logger.new($stdout) ; Mongoid.logger
      #<ActiveSupport::BufferedLogger:0x3e99d48 @buffer={}, @guard=#<Mutex:0x3e99be0>, @log=#<File:/app/log/development.log>, @auto_flushing=1, @level=0>
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            gurgeous Adam Doppelt
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: