Public class methods
new
(settings = {})
Use the standard error as the output logger, and use $STYLE_SOCKET as the socket on which to listen
[show source]
# File lib/style/handler/scgi.rb, line 7 7: def initialize(settings = {}) 8: @socket ||= $STYLE_SOCKET 9: @total_conns ||= 0 10: @shutdown ||= false 11: @dead ||= false 12: @threads ||= Queue.new 13: @log = Object.new 14: def @log.info(msg) 15: STDERR.puts("[INF][#{@pid ||= Process.pid}] #{msg}") 16: end 17: def @log.error(msg, exc=nil) 18: STDERR.puts("[ERR][#{@pid ||= Process.pid}] #{msg}#{": #{exc}\n#{exc.backtrace.join("\n")}" if exc}") 19: end 20: @maxconns ||= settings[:maxconns] || 2**30-1 21: super() 22: setup_signals 23: end