Skip to content

Commit

Permalink
chore: use passed in logger, not module included logger, for sequel c…
Browse files Browse the repository at this point in the history
…onnection
  • Loading branch information
bethesque committed Nov 23, 2021
1 parent bf4f4e2 commit 27d5948
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/pact_broker/initializers/database_connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def self.create_database_connection(config, logger = nil)
sequel_config = config.dup
max_retries = sequel_config.delete(:connect_max_retries) || 0
connection_validation_timeout = config.delete(:connection_validation_timeout)
configure_logger(sequel_config)
configure_logger(sequel_config, logger)
create_sqlite_database_dir(config)

connection = with_retries(max_retries, logger) do
Expand Down Expand Up @@ -46,7 +46,7 @@ def self.create_database_connection(config, logger = nil)
end
end

private_class_method def self.configure_logger(sequel_config)
private_class_method def self.configure_logger(sequel_config, logger)
if sequel_config[:sql_log_level] == :none
sequel_config.delete(:sql_log_level)
elsif logger
Expand Down

0 comments on commit 27d5948

Please sign in to comment.