Skip to content

Commit

Permalink
Replace NullLogger with Logger.new(nil)
Browse files Browse the repository at this point in the history
  • Loading branch information
yakjuly committed Jun 16, 2020
1 parent d136cc2 commit 5dd5b8e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion dynamoid.gemspec
Expand Up @@ -44,7 +44,6 @@ Gem::Specification.new do |spec|
spec.add_runtime_dependency 'activemodel', '>=4'
spec.add_runtime_dependency 'aws-sdk-dynamodb', '~> 1.0'
spec.add_runtime_dependency 'concurrent-ruby', '>= 1.0'
spec.add_runtime_dependency 'null-logger'

spec.add_development_dependency 'appraisal', '~> 2.2'
spec.add_development_dependency 'bundler'
Expand Down
3 changes: 1 addition & 2 deletions lib/dynamoid/config.rb
Expand Up @@ -2,7 +2,6 @@

require 'uri'
require 'logger'
require 'null_logger'
require 'dynamoid/config/options'
require 'dynamoid/config/backoff_strategies/constant_backoff'
require 'dynamoid/config/backoff_strategies/exponential_backoff'
Expand Down Expand Up @@ -78,7 +77,7 @@ def logger
# @since 0.2.0
def logger=(logger)
case logger
when false, nil then @logger = NullLogger.new
when false, nil then @logger = ::Logger.new(nil)
when true then @logger = default_logger
else
@logger = logger if logger.respond_to?(:info)
Expand Down

0 comments on commit 5dd5b8e

Please sign in to comment.