DEV: Log to STDOUT in development like how rails s used to.

This commit is contained in:
Guo Xiang Tan 2018-08-13 17:05:42 +08:00
parent 664186a2a4
commit dadbf2edb4

View File

@ -1,3 +1,14 @@
if Rails.env.development? && !Sidekiq.server?
console = ActiveSupport::Logger.new(STDOUT)
original_logger = Rails.logger.chained.first
console.formatter = original_logger.formatter
console.level = original_logger.level
unless ActiveSupport::Logger.logger_outputs_to?(original_logger, STDOUT)
original_logger.extend(ActiveSupport::Logger.broadcast(console))
end
end
if Rails.env.production?
Logster.store.ignore = [
# honestly, Rails should not be logging this, its real noisy