Forum: Ruby on Rails Default logger inside arbitrary classes

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Oscar Picasso (Guest)
on 2006-04-04 05:14
(Received via mailing list)
Hi,

What's the best way to get the default logger (the one used during the
tests) from inside a class that doesn't inherit any rails class?

Thanks

Oscar
Mariano K. (Guest)
on 2006-04-06 11:52
(Received via mailing list)
Hi Oscar,

  I was looking for that myself, but didn't find any documentation on
how to
do that exactly.

  But in this documentation (
http://wiki.rubyonrails.org/rails/pages/HowtoConfi...) you'll
see
that there is a Rails constant RAILS_DEFAULT_LOGGER, which works fine. I
am
not sure if that is the right way though.

  RAILS_DEFAULT_LOGGER.warn("xyz")

Cheers,
Mariano
Mariano K. (Guest)
on 2006-04-06 12:02
(Received via mailing list)
Hi Oscar,

  I was looking for that myself, but didn't find any documentation on
how to
do that exactly.

  But in this documentation (
http://wiki.rubyonrails.org/rails/pages/HowtoConfi...) you'll
see
that there is a Rails constant RAILS_DEFAULT_LOGGER, which works fine. I
am
not sure if that is the right way though.

  RAILS_DEFAULT_LOGGER.warn("xyz")

Cheers,
Mariano
This topic is locked and can not be replied to.