DEV: keep `bin/unicorn` clean from log noise
This commit is contained in:
parent
983dba37ce
commit
b504398a91
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
if !ENV["RAILS_ENV"] && (ARGV[0] == "s" || ARGV[0] == "server")
|
if !ENV["RAILS_ENV"] && (ARGV[0] == "s" || ARGV[0] == "server")
|
||||||
ENV["UNICORN_PORT"] = "3000"
|
ENV["UNICORN_PORT"] = "3000"
|
||||||
|
ENV["RAILS_LOGS_STDOUT"] ||= "1"
|
||||||
exec File.expand_path("unicorn", __dir__)
|
exec File.expand_path("unicorn", __dir__)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
if Rails.env.development? && !Sidekiq.server?
|
if Rails.env.development? && !Sidekiq.server? && ENV["RAILS_LOGS_STDOUT"] == "1"
|
||||||
console = ActiveSupport::Logger.new(STDOUT)
|
console = ActiveSupport::Logger.new(STDOUT)
|
||||||
original_logger = Rails.logger.chained.first
|
original_logger = Rails.logger.chained.first
|
||||||
console.formatter = original_logger.formatter
|
console.formatter = original_logger.formatter
|
||||||
|
|
Loading…
Reference in New Issue