Forum: JRuby Logging with Trinidad?

Posted by James Moore (jamesthepiper)
on 2010-08-25 21:41
(Received via mailing list)
I'm starting to use Trinidad, and one of the first things I noticed is
that it doesn't write to the normal rails log at all.  I don't see
anything in the doc about custom trindad logging, but it looks like
I'm not the only one to hit this problem:
http://github.com/calavera/trinidad/issues/#issue/11

Is there some custom Trinidad log that it uses instead of the normal 
Rails logs?

--
James Moore
james@restphone.com
http://jamesmoorecode.blogspot.com/

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Posted by Brandon Hauff (Guest)
on 2010-08-25 21:47
(Received via mailing list)
It seems to write to trinidad.log by default.  There is an extension
giving some more logging flexibility at
http://github.com/calavera/trinidad_logging_extension
Posted by David Calavera (Guest)
on 2010-08-25 22:18
(Received via mailing list)
Actually Trinidad doesn't handle the loggin by default, it's just a 
wrapper
for JRuby-Rack. My guess is that I haven't configured jruby-rack logging
properly. These are the logging methods that JRuby-Rack supports:

put("commons_logging", "org.jruby.rack.logging.CommonsLoggingLogger");

put("clogging",        "org.jruby.rack.logging.CommonsLoggingLogger");

put("slf4j",           "org.jruby.rack.logging.Slf4jLogger");

put("servlet_context", "org.jruby.rack.logging.ServletContextLogger");

put("stdout",          "org.jruby.rack.logging.StandardOutLogger");


By default it uses "serviet_context" which means that's the server who
manages the logging finally. Those values can be changes setting the 
java
property "jruby.rack.logging" but I didn't test it yet.

As Brandon says the logging extension gives you more flexibility, you 
can
configure filters or log rotations for instance, but the initial
configuration issue should be solved.

Any help will be really appreciated.

Cheers
Posted by Brandon Hauff (Guest)
on 2010-08-25 22:20
(Received via mailing list)
Hi David,



I know glassfish logged to the rails log files (development, test,
production) not sure if you could steal from there.



Thanks,



Brandon



From: David Calavera [mailto:david.calavera@gmail.com]
Sent: Wednesday, August 25, 2010 3:18 PM
To: user@jruby.codehaus.org
Subject: Re: [jruby-user] Logging with Trinidad?



Actually Trinidad doesn't handle the loggin by default, it's just a
wrapper for JRuby-Rack. My guess is that I haven't configured jruby-rack
logging properly. These are the logging methods that JRuby-Rack
supports:



  put("commons_logging",
"org.jruby.rack.logging.CommonsLoggingLogger");

  put("clogging",
"org.jruby.rack.logging.CommonsLoggingLogger");

  put("slf4j",           "org.jruby.rack.logging.Slf4jLogger");

  put("servlet_context",
"org.jruby.rack.logging.ServletContextLogger");

  put("stdout",
"org.jruby.rack.logging.StandardOutLogger");



By default it uses "serviet_context" which means that's the server who
manages the logging finally. Those values can be changes setting the
java property "jruby.rack.logging" but I didn't test it yet.



As Brandon says the logging extension gives you more flexibility, you
can configure filters or log rotations for instance, but the initial
configuration issue should be solved.



Any help will be really appreciated.



Cheers



On Wed, Aug 25, 2010 at 9:47 PM, Brandon Hauff
<Brandon.Hauff@buckle.com> wrote:

It seems to write to trinidad.log by default.  There is an extension
giving some more logging flexibility at
http://github.com/calavera/trinidad_logging_extension
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.