Class: Tablexi::Logger::Railtie
- Inherits:
-
Rails::Railtie
- Object
- Rails::Railtie
- Tablexi::Logger::Railtie
- Defined in:
- lib/tablexi/logger/railtie.rb
Instance Method Summary collapse
Instance Method Details
#setup_lograge(app) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/tablexi/logger/railtie.rb', line 10 def setup_lograge(app) # since Lograge's after_initialize isn't guaranteed to run before this one # we need to make sure the setup occurs before we check lograge.logger Lograge.setup(app) return unless Lograge::RequestLogSubscriber.new.logger == Rails.logger # We need to preserve lograge file format integrity if lograge is using # Rails.logger - presumably error tracking services will report the errors # so they aren't swallowed silently. null_logger = ::Logger.new(File.open(File::NULL, "w")) Tablexi. = null_logger end |