Forum: Ruby on Rails using the logger from Libs directory

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.
3b60435154915157dfd7ebfc04164930?d=identicon&s=25 sergio.sprite (Guest)
on 2009-02-13 09:50
(Received via mailing list)
Hello everybody, I need to log some messages from some class on Libs
directory, do you know how can I access the logger.info from this
directory ? is there a way to do this ? I would appreciate your help,
thanks in advice
9bb51d32191ba06591773be7fed21b3d?d=identicon&s=25 Oldtimer (Guest)
on 2009-02-13 13:40
(Received via mailing list)
On 13 Feb., 00:39, "sergio.sprite" <sergio.spr...@gmail.com> wrote:
> Hello everybody, I need to log some messages from some class on Libs
> directory, do you know how can I access the logger.info from this
> directory ? is there a way to do this ? I would appreciate your help,
> thanks in advice

if you use a rake with option 'environment', just use that:

RAILS_DEFAULT_LOGGER.info('xxxx')

;-)
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2009-02-13 14:36
(Received via mailing list)
On 13 Feb 2009, at 12:40, Oldtimer wrote:

>
> RAILS_DEFAULT_LOGGER.info('xxxx')
>
Or Rails.logger (which boils down to the same thing)
This topic is locked and can not be replied to.