Skip to content

Commit e412ff0

Browse files
committed
made dev mode perform_caching & log_level overridable via env vars
1 parent 055bf9b commit e412ff0

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

config/environments/development.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@
1414

1515
# Show full error reports and disable caching.
1616
config.consider_all_requests_local = true
17-
config.action_controller.perform_caching = false
17+
config.action_controller.perform_caching = ActiveRecord::Type::Boolean.new.cast(ENV['PERFORM_CACHING']) || false
1818

1919
# Enable server timing
2020
config.server_timing = true
2121

22+
config.log_level = ENV['LOG_LEVEL'] || :info
23+
2224
# Set the cache store to the redis that was configured in the database.yml
2325
processed = ERB.new(File.read(Rails.root.join('config', 'database.yml'))).result(binding)
2426
redis_config = YAML.safe_load(processed, permitted_classes: [], permitted_symbols: [], aliases: true)["redis_#{Rails.env}"]

0 commit comments

Comments
 (0)