Skip to content

Commit

Permalink
Use more appropriate log level setting
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredcwhite committed Dec 15, 2024
1 parent 533cc77 commit 83d045c
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions bridgetown/lib/bridgetown/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
end

require "bridgetown-core/rack/boot"
class Bridgetown::Rack::Logger
def add(*)
super if ENV["SERVER_LOGS"] == "true"
end
end

Bridgetown::Current.preloaded_configuration = Bridgetown.configuration
Bridgetown::Rack.boot
Expand All @@ -30,7 +25,16 @@ class Bridgetown::Test < Minitest::Test

def roda_app_class = RodaApp

def app = roda_app_class.app
def roda_log_level = Logger::WARN

def app
return @app if @app

# Set the log level to warn so we don't see all the usual HTTP chatter when testing
roda_app_class.opts[:common_logger].level = roda_log_level

@app = roda_app_class.app
end

def site
roda_app_class.opts[:bridgetown_site]
Expand Down

0 comments on commit 83d045c

Please sign in to comment.