Why does jruby-rack hijack the logger?

This is really a pain. Jruby rack takes over the logger, leaving rails
logging basically broken.

Rails logging levels do not match java logging levels. 4 is the
highest number you can use in rails. That matches the java INFO
level. So if I actually want INFO/WARN/ERROR levels in rails, I’m
screwed. If I set the tomcat logging to something like FINE, that
turns on all sorts of debug logging in tomcat I don’t want.

To fix this, I have to remove the rails constants that define the
levels, then add constants for the java levels.

I’d much prefer that jruby rack just left the logger alone. It’s easy
enough in rails to define your own custom logger if you want to use
java logging. And it’s much cleaner that way. Currently, without
digging through the jruby rack code you would just be confused as to
what’s going on.

Chris

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