Sha256: 277e5f1f77720f64276b7cfc0b269e66c49278568e961ef44de7ed2e30318d46

Contents?: true

Size: 452 Bytes

Versions: 1

Compression:

Stored size: 452 Bytes

Contents

# encoding: UTF-8

require 'logger'

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')
      returning(@app.call(params)) do |result|
        logger.info('Pipeline ending')
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gooddata-0.6.0 lib/gooddata/bricks/middleware/logger_middleware.rb