Rails: Threading & Logging
I ran across a very strange behaviour the other day: the log files for all servers in production mode (with config.threadsafe!) stopped receiving content after a while.
After playing and googling around there is a solution: Use another logger.
The default Rails logger is not threadsafe.
I replaced it by log4r and everything is fine. And additionally I got timestamps and severity messages in the production.log - sweet!
Written by Martin Röbert
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#