class Sinatra::Base configure do use Rack::CommonLogger, SyslogLogger.new end before do env["rack.errors"] = SyslogLogger.new unless env["rack.errors"].is_a? StringIO end end