Skip to content

Commit

Permalink
chore: don't log SQL when DEBUG=true unless PACT_BROKER_SQL_LOG_LEVEL…
Browse files Browse the repository at this point in the history
… is set and not none
  • Loading branch information
bethesque committed Jun 3, 2022
1 parent 06f85dd commit 1f3dcc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/db.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module DB
def self.connect db_credentials
# Keep this conifiguration in sync with lib/pact_broker/app.rb#configure_database_connection
Sequel.datetime_class = DateTime
if ENV["DEBUG"] == "true" && ENV["PACT_BROKER_SQL_LOG_LEVEL"] != "none"
if ENV["DEBUG"] == "true" && ENV["PACT_BROKER_SQL_LOG_LEVEL"] && ENV["PACT_BROKER_SQL_LOG_LEVEL"] != "none"
logger = Logger.new($stdout)
end
if db_credentials.fetch("adapter") == "sqlite"
Expand Down

0 comments on commit 1f3dcc8

Please sign in to comment.