lograge
lograge copied to clipboard
How to use Lograge with threads?
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.
It turns out the issue is that Lograge is not logging errors.