Bringing this back to the list, as I haven’t gotten any further by
digging into Rack and am not sure where my solution lies.
-Joel
----- Forwarded Message -----
From: “Joel E. Wilson” [email protected]
To: “Jan Luehe” [email protected]
Cc: “Arun G.” [email protected]
Sent: Monday, July 21, 2008 3:44:44 PM GMT -06:00 US/Canada Central
Subject: Re: [jruby-user] Logging issue w/ JRuby 1.1.2 on Glassfish
The console page for setting up the virtual server has a section with a
server log and a separate section for access log, which I guess I can
turn on from the main HTTP Listener configuration screen. I did a bit
more playing around. I wanted to try a none JRuby/Rails application to
make sure that wasn’t the problem. This time I took the logging sample
that can be downloaded from the Glassfish site and first installed it in
my default server at 8080 to confirm that it produces the expected log
output. It does. Then I installed it in my second virtual server on
3333 and confirmed that it doesn’t.
When I had made a mistake in the environment.rb file of my test
application in a way that created a syntax error, the error /did/ make
it into the testapp logfile (the name I gave the 2nd server’s log), so
it would appear that STDOUT or STDERR output may make it in there, but
standard log output does not. Rails 2.x uses
ActiveSupport::BufferedLogger by default. I put <%=
h(RAILS_DEFAULT_LOGGER.inspect) %> into my test page and discovered that
the log device is set to JRuby::Rack::ServletLog. Looking into the Rack
code indicates that it’s hard coding env[‘rails.error’] to that. I’m
not in front of my workstation where I was researching this, but I think
$servletcontext.log was involved in that definition, too.
Unfortunately, Rack hardcodes it and doesn’t appear to give a mechanism
for working around it, so that I can redefine the logger to go to some
file without hacking into the Rack code.
-Joel
----- Original Message -----
From: “Jan Luehe” [email protected]
To: “Joel E. Wilson” [email protected]
Cc: “Arun G.” [email protected]
Sent: Friday, July 18, 2008 10:38:50 AM GMT -06:00 US/Canada Central
Subject: Re: [jruby-user] Logging issue w/ JRuby 1.1.2 on Glassfish
Joel,
Joel E. Wilson wrote:
Thank you. I’ve got the default setting, which is that access logs aren’t turned on. I’m referring to the server logs.
I’m not aware that we support separate server log files per virtual
server.
Separate log files per virtual server are only supported for access
logging.
Jan
Hi Joel,
-Joel
All of the apps that I’m working to transition from pack-of-mongrels to
statement to generate an exception trace and still nothing is written,
Have you done anything to explicitly override the Rails logger?
To unsubscribe from this list, please visit:
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email