deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "marios@redhat.com" <mandr...@redhat.com>
Subject Re: [PATCH core 1/3] Make DC compatible with webrick
Date Fri, 19 Oct 2012 12:39:40 GMT
ACK series - mem leak issue fixed - slight problem starting with webrick
but michal is on it

On 18/10/12 22:43, mfojtik@redhat.com wrote:
> From: Michal Fojtik <mfojtik@redhat.com>
> 
> 
> Signed-off-by: Michal fojtik <mfojtik@redhat.com>
> ---
>  server/lib/sinatra/rack_logger.rb | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/server/lib/sinatra/rack_logger.rb b/server/lib/sinatra/rack_logger.rb
> index 677444b..02bbf2a 100644
> --- a/server/lib/sinatra/rack_logger.rb
> +++ b/server/lib/sinatra/rack_logger.rb
> @@ -89,7 +89,8 @@ module Rack
>        params = env['rack.request.form_hash'].nil? ? '' : ' '+env['rack.request.form_hash'].to_json
>  
>        logger = @logger || env['rack.errors']
> -      logger << VERBOSE_FORMAT % [
> +      logger_method = logger.respond_to?(:info) ? :info : :puts
> +      logger.send logger_method, VERBOSE_FORMAT % [
>          env['HTTP_X_FORWARDED_FOR'] || env["REMOTE_ADDR"] || "-",
>          env["REMOTE_USER"] || "-",
>          now.strftime("%d/%b/%Y %H:%M:%S"),
> @@ -110,7 +111,8 @@ module Rack
>        length = extract_content_length(header)
>  
>        logger = @logger || env['rack.errors']
> -      logger << FORMAT % [
> +      logger_method = logger.respond_to?(:info) ? :info : :puts
> +      logger.send logger_method, FORMAT % [
>          env['HTTP_X_FORWARDED_FOR'] || env["REMOTE_ADDR"] || "-",
>          env["REMOTE_USER"] || "-",
>          now.strftime("%d/%b/%Y %H:%M:%S"),
> 


Mime
View raw message