lib/gooddata/bricks/middleware/logger_middleware.rb in gooddata-0.6.0.pre11 vs lib/gooddata/bricks/middleware/logger_middleware.rb in gooddata-0.6.0
- old
+ new
@@ -1,17 +1,17 @@
+# encoding: UTF-8
+
require 'logger'
-require File.join(File.dirname(__FILE__), "base_middleware")
+require_relative 'base_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")
+ 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")
+ logger.info('Pipeline ending')
end
end
-
end
end
\ No newline at end of file