Skip to content

Commit

Permalink
Merge pull request #1181 from bartekbsh/dont-verify-logger
Browse files Browse the repository at this point in the history
Remove explicit `Logger` class verification
  • Loading branch information
marcotc committed Sep 23, 2020
2 parents d34b5b7 + 3f0542b commit aab3a75
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 0 additions & 1 deletion lib/ddtrace/configuration/settings.rb
Expand Up @@ -96,7 +96,6 @@ class Settings

settings :logger do
option :instance do |o|
o.setter { |value, old_value| value.is_a?(::Logger) ? value : old_value }
o.on_set { |value| set_option(:level, value.level) unless value.nil? }
end

Expand Down
9 changes: 8 additions & 1 deletion spec/ddtrace/configuration/settings_spec.rb
Expand Up @@ -301,7 +301,14 @@
end

describe '#instance=' do
let(:logger) { Datadog::Logger.new(STDOUT) }
let(:logger) do
double(:logger,
debug: true,
info: true,
warn: true,
error: true,
level: true)
end

it 'updates the #instance setting' do
expect { settings.logger.instance = logger }
Expand Down

0 comments on commit aab3a75

Please sign in to comment.