Is Rails Logger Thread Safe?

Is Rails Logger truly not Thread Safe?
http://log.kares.org/2011/04/railslogger-is-not-threadsafe.html

This seems like an issue that should have been picked up quite a long
time
ago. I just set config.threadsafe! in my config/application.rb and my
log
output from rails server has completely disappeared.

If the logger is not thread-safe, I cannot help but wonder how much of
the
Rails core is not thread safe. Is config.threadsafe! even a viable thing
to
use in Rails?

On Friday, October 5, 2012 4:51:26 PM UTC+1, Brandon Mathis wrote:

Is Rails Logger truly not Thread Safe?
http://log.kares.org/2011/04/railslogger-is-not-threadsafe.html

This seems like an issue that should have been picked up quite a long time
ago. I just set config.threadsafe! in my config/application.rb and my log
output from rails server has completely disappeared.

It looks like someone tried to fix that around a year ago

https://github.com/rails/rails/commit/d565fda5f27abf0097adf7b3e232a52f7ae5c1e9#activesupport/lib/active_support/buffered_logger.rb
What version of rails are you using ?

Fred

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs