Class: RequestLog::Threads

Class | RequestLog::Threads
In: | lib/mongrel/debug.rb lib/mongrel/debug.rb
Parent: | GemPlugin::Plugin"/handlers"

### Methods

process process

### Included Modules

Mongrel::HttpHandlerPlugin Mongrel::HttpHandlerPlugin

### Public Instance methods

process(request, response)

[Source]

         # File lib/mongrel/debug.rb, line 175
    175:     def process(request, response)
    176:       MongrelDbg::trace(:threads, "#{Time.now} REQUEST #{request.params['PATH_INFO']}")
    177:       begin
    178:         ObjectSpace.each_object do |obj|
    179:           begin
    180:             if obj.class == Mongrel::HttpServer
    181:               worker_list = obj.workers.list
    182:
    183:               if worker_list.length > 0
    184:                 keys = "-----\n\tKEYS:"
    185:                 worker_list.each {|t| keys << "\n\t\t-- #{t}: #{t.keys.inspect}" }
    186:               end
    187:
    188:               MongrelDbg::trace(:threads, "#{obj.host}:#{obj.port} -- THREADS: #{worker_list.length} #{keys}")
    189:             end
    190:           rescue Object # Ignore since obj.class can sometimes take parameters
    191:           end
    192:         end
    193:       rescue Object # Ignore since ObjectSpace might not be loaded on JRuby
    194:       end
    195:     end

process(request, response)

[Source]

         # File lib/mongrel/debug.rb, line 175
    175:     def process(request, response)
    176:       MongrelDbg::trace(:threads, "#{Time.now} REQUEST #{request.params['PATH_INFO']}")
    177:       begin
    178:         ObjectSpace.each_object do |obj|
    179:           begin
    180:             if obj.class == Mongrel::HttpServer
    181:               worker_list = obj.workers.list
    182:
    183:               if worker_list.length > 0
    184:                 keys = "-----\n\tKEYS:"
    185:                 worker_list.each {|t| keys << "\n\t\t-- #{t}: #{t.keys.inspect}" }
    186:               end
    187:
    188:               MongrelDbg::trace(:threads, "#{obj.host}:#{obj.port} -- THREADS: #{worker_list.length} #{keys}")
    189:             end
    190:           rescue Object # Ignore since obj.class can sometimes take parameters
    191:           end
    192:         end
    193:       rescue Object # Ignore since ObjectSpace might not be loaded on JRuby
    194:       end
    195:     end

[Validate]