Sha256: da62baa3d2432148a0b16fb83ec932e76aa60066c73d4cd493f0d5305ddd8dbd

Contents?: true

Size: 353 Bytes

Versions: 1

Compression:

Stored size: 353 Bytes

Contents

require 'logger'

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

Version data entries

1 entries across 1 versions & 1 rubygems

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