Skip to content

Commit

Permalink
Only require logger on demo site if it will be used
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyevans committed Jun 7, 2024
1 parent 0ae6563 commit 18a2efc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions demo-site/models.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require 'sequel'
require 'logger'
$:.unshift(::File.expand_path('../../lib', __FILE__))

module FormeDemo
Expand Down Expand Up @@ -55,7 +54,11 @@ def DB.reset

DB.reset

DB.loggers << Logger.new($stdout) unless DEMO_MODE
unless DEMO_MODE
require 'logger'
DB.loggers << Logger.new($stdout)
end

Model.freeze_descendents
DB.freeze
end

0 comments on commit 18a2efc

Please sign in to comment.