Fwd: no logging from Rails apps


#1

Here is a message I just sent internally. Thought it might be an
interesting FYI for some on this list. We have multiple Rails 2.1.0
apps deployed in Tomcat 5.5 using Warbler-0.9.11/jruby-rack-0.9.2.
Below is the last message in the Tomcat logs which comes from
rails-2.1.0/lib/initializer.rb. It surprised me that this problem with
one app affected all the others in the same container(usage of
environment vars?)

Rails Error: Unable to access log file. Please ensure that somepath/
WEB-INF/log/production.log exists and is chmod 0666. The log level has
been raised to WARN and the output directed to STDERR until the
problem is fixed.

-lenny

Begin forwarded message:


#2

Normally JRuby-Rack sets up the logger to go to the application server
(which you probably already know) during the boot process. Any idea
why that code isn’t doing its thing?

/Nick

On Fri, Nov 21, 2008 at 3:53 PM, Lenny M. removed_email_address@domain.invalid wrote:

is fixed.
to permissions will have the affect of swallowing all log statements for all
applications from that point on(???).


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

#3

Actually I didn’t realize that and had an explicit config.logger =
Logger.new(STDOUT) in my environment.rb. Back in Goldspike I’m pretty
sure that logging output did not go to the app server logs by
default. Anyway, I’ll try taking that out entirely. I’m still a
little surprised how this affected other apps in the same servlet
container.

Thanks,
-lenny

On Nov 22, 2008, at 1:20 AM, Nick S. wrote:

deployed in
log level
After


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

#4

You might want to look into using the ‘logging’ gem. I’m not sure what
if anything changed in Rails 2.2, but I’ve been happy with it. Here is
some notes from when I set it up:

https://trisano.csinitiative.net/wiki/TriSanoLogging

Mike H.
Program Manager, The Collaborative Software Initiative
removed_email_address@domain.invalid
www.csinitiative.com

----- Original Message -----
From: Lenny M. removed_email_address@domain.invalid
To: removed_email_address@domain.invalid
Sent: Sat, 22 Nov 2008 07:24:26 -0600 (CST)
Subject: Re: [jruby-user] Fwd: no logging from Rails apps

Actually I didn’t realize that and had an explicit config.logger =
Logger.new(STDOUT) in my environment.rb. Back in Goldspike I’m pretty
sure that logging output did not go to the app server logs by
default. Anyway, I’ll try taking that out entirely. I’m still a
little surprised how this affected other apps in the same servlet
container.

Thanks,
-lenny

On Nov 22, 2008, at 1:20 AM, Nick S. wrote:

deployed in
log level
After


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email