lib/gooddata/bricks/middleware/logger_middleware.rb in gooddata-0.6.0.pre3 vs lib/gooddata/bricks/middleware/logger_middleware.rb in gooddata-0.6.0.pre4

- old
+ new

@@ -1,14 +1,16 @@ require 'logger' -class LoggerMiddleware < GoodData::Bricks::Middleware +module GoodData::Bricks + class LoggerMiddleware < GoodData::Bricks::Middleware - def call(params) - logger = params[:gdc_logger] = params[:GDC_LOGGER_FILE].nil? ? Logger.new(STDOUT) : Logger.new(params[:GDC_LOGGER_FILE]) - logger.info("Pipeline starts") + def call(params) + logger = params[:gdc_logger] = params[:GDC_LOGGER_FILE].nil? ? Logger.new(STDOUT) : Logger.new(params[:GDC_LOGGER_FILE]) + logger.info("Pipeline starts") - returning(@app.call(params)) do |result| - logger.info("Pipeline ending") + returning(@app.call(params)) do |result| + logger.info("Pipeline ending") + end end - end + end end \ No newline at end of file