lograge icon indicating copy to clipboard operation
lograge copied to clipboard

How to use Lograge with threads?

Open georgeu2000 opened this issue 7 years ago • 1 comments

When calling Rails.logger.info "Log message..." from a new thread, no message is logged. How to make it work with a new thread? Apparently the fix for Rails logger is

ensure
  Rails.logger.flush 

But this did not help.

Also, another workaround is to set a new logger within the thread. But not sure how to do this since it is set up within a config block in production.rb.

georgeu2000 avatar Jan 04 '19 21:01 georgeu2000

It turns out the issue is that Lograge is not logging errors.

georgeu2000 avatar Jan 04 '19 21:01 georgeu2000