Jruby / Rails / Logging


#1

Hello,

I am noticing an odd issue where after a while there are no more logs
in the localhost-YYYY-MM-DD.log file in Tomcat when running
Jruby/Rails under Tomcat 5. The logs seem to show up fine in the
beginning but then after a while only errors show up and no info/debug
information.

Has anyone else seen this issue and have a resolution? It makes it
very difficult to try and debug.

Thanks


#2

I dare to respond to this one despite the fact that the post is pretty
old.

I think I had the very same issue with “disappearing” logs with JRuby on
Rails and I couldn’t find nothing except this (unanswered) post.

Here’s an answer that will hopefully help someone struggling this :

Rails.logger is not working correctly (it’s level might unpredictably
change from time to time) in a threadsafe! environment, read more here :

http://log.kares.org/2011/04/railslogger-is-not-threadsafe.html