mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 02:11:08 -06:00
DEV: Log to STDOUT in development like how rails s
used to.
This commit is contained in:
parent
664186a2a4
commit
dadbf2edb4
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user