Skip to content

Commit bfbb1b4

Browse files
committed
Make the rails log level configurable in development
When running rake tasks locally there can be a lot of output from SQL queries and active storage, making it harder to see warnings. Make it possible to configure the Rails log level in development using environment variables. This is just like the code in production.rb except it uses the development default of debug.
1 parent 797d29d commit bfbb1b4

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

config/environments/development.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@
5555
# Print deprecation notices to the Rails logger.
5656
config.active_support.deprecation = :log
5757

58+
config.log_level = ENV.fetch('RAILS_LOG_LEVEL', 'debug')
59+
5860
# Raise exceptions for disallowed deprecations.
5961
config.active_support.disallowed_deprecation = :raise
6062

0 commit comments

Comments
 (0)