On 10/8/07, Jens Kraemer <[EMAIL PROTECTED]> wrote:
> On Mon, Oct 08, 2007 at 09:17:25AM +1300, Robert Egglestone wrote:
> > Hey Jens,
> >
> > A log4r logger that connects up to a Java logger would be very useful
> > for keeping all the logs together.
>
> Yep.
>
> I wonder if it would be possible to just use log4j's static
> Logger.getLogger method to get hold of that central logger instance, and
> then build a log4r compatibility layer around it. After all, the
> different JRuby runtimes share the same JVM.
>
> Another way would be to extend RailsServlet to inject a handle to the
> logger into the runtime object as it does with $servlet_context.

We're doing something much like this in our applications to have all
Rails logger output go to Glassfish's log files. Just make sure this
gets loaded during the initialization sequence (in environment.rb or a
plugin init.rb).

http://pastie.caboo.se/104897

/Nick
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel

Reply via email to