mirror of
https://github.com/discourse/discourse.git
synced 2025-01-30 16:19:31 +08:00
DEV: Support custom log level in dev
See https://guides.rubyonrails.org/debugging_rails_applications.html#log-levels Can be used to reduce noise when running "bundle exec rails server" in dev. Setting DISCOURSE_DEV_LOG_LEVEL="warn" will make for easier puts debugging with unicorn.
This commit is contained in:
parent
e51091f199
commit
78969d7719
|
@ -1,7 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
Discourse::Application.configure do
|
Discourse::Application.configure do
|
||||||
|
|
||||||
# Settings specified here will take precedence over those in config/application.rb
|
# Settings specified here will take precedence over those in config/application.rb
|
||||||
|
|
||||||
# In the development environment your application's code is reloaded on
|
# In the development environment your application's code is reloaded on
|
||||||
|
@ -38,6 +37,8 @@ Discourse::Application.configure do
|
||||||
|
|
||||||
config.action_mailer.raise_delivery_errors = true
|
config.action_mailer.raise_delivery_errors = true
|
||||||
|
|
||||||
|
config.log_level = ENV['DISCOURSE_DEV_LOG_LEVEL'] if ENV['DISCOURSE_DEV_LOG_LEVEL']
|
||||||
|
|
||||||
BetterErrors::Middleware.allow_ip! ENV['TRUSTED_IP'] if ENV['TRUSTED_IP']
|
BetterErrors::Middleware.allow_ip! ENV['TRUSTED_IP'] if ENV['TRUSTED_IP']
|
||||||
|
|
||||||
if defined?(Unicorn) && ENV["UNICORN_WORKERS"].to_i != 1
|
if defined?(Unicorn) && ENV["UNICORN_WORKERS"].to_i != 1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user