Sha256: 015e364650eaa9d4b23779a737e1c7bba7df278b1d4ce3138077443beab0562b

Contents?: true

Size: 520 Bytes

Versions: 21

Compression:

Stored size: 520 Bytes

Contents

module Grape
  module DSL
    module Logger
      include Grape::DSL::Settings

      attr_writer :logger

      # Set or retrive the configured logger. If none was configured, this
      # method will create a new one, logging to stdout.
      # @param logger [Object] the new logger to use
      def logger(logger = nil)
        if logger
          global_setting(:logger, logger)
        else
          global_setting(:logger) || global_setting(:logger, ::Logger.new($stdout))
        end
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
grape-extra_validators-2.0.0 vendor/bundle/ruby/2.6.0/gems/grape-1.2.5/lib/grape/dsl/logger.rb
grape-extra_validators-1.0.0 vendor/bundle/ruby/2.4.0/gems/grape-1.2.5/lib/grape/dsl/logger.rb
grape-1.2.5 lib/grape/dsl/logger.rb
grape-1.2.4 lib/grape/dsl/logger.rb
grape-1.2.3 lib/grape/dsl/logger.rb
grape-1.2.2 lib/grape/dsl/logger.rb
grape-1.2.1 lib/grape/dsl/logger.rb
grape-1.2.0 lib/grape/dsl/logger.rb
grape-1.1.0 lib/grape/dsl/logger.rb
grape-1.0.3 lib/grape/dsl/logger.rb
grape-1.0.2 lib/grape/dsl/logger.rb
grape-1.0.1 lib/grape/dsl/logger.rb
grape-1.0.0 lib/grape/dsl/logger.rb
grape-0.19.2 lib/grape/dsl/logger.rb
grape-0.19.1 lib/grape/dsl/logger.rb
grape-0.19.0 lib/grape/dsl/logger.rb
grape-0.18.0 lib/grape/dsl/logger.rb
grape-0.17.0 lib/grape/dsl/logger.rb
grape-0.16.2 lib/grape/dsl/logger.rb
grape-0.16.1 lib/grape/dsl/logger.rb