Forum: Rails Engines How to Create logger

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.
unknown (Guest)
on 2006-02-11 13:50
(Received via mailing list)
Hello,
  First of all congratulations and thanks for rail engines, it is
extremely
useful and make it even more fun to use ruby on rails.

The Engines Doc says that to use the  engines logger one should call

Engines.create_logger

But where should this call be ideally made? In applications.rb?

Second, what are the potential benefit of using engines logger instead
of rails
logger.

Thanks for your help.

--
Surendra S.

http://ssinghi.kreeti.com, http://www.kreeti.com
Read the latest news at: http://news.kreeti.com
James A. (Guest)
on 2006-02-11 15:24
(Received via mailing list)
The engine's logger is simply a debug tool, and the main reason for
creating it was to avoid adding noise to Rails' default log. It should
make it easier to debug the engine loading process. It's also quite
flexible in that you can set the logger to be the same as
RAILS_DEFAULT_LOGGER should you with.

You can create the logger anywhere you like (before you do, the logger
is actually set to be a dummy object that will accept any and all
method calls silently, so you could set it to be any object you like
in theory), but I'd suggest you create the logger in environment.rb
unless there's a good reason not to.

- james

On 2/11/06, removed_email_address@domain.invalid 
<removed_email_address@domain.invalid> wrote:
> Second, what are the potential benefit of using engines logger instead of rails
> _______________________________________________
> engine-users mailing list
> removed_email_address@domain.invalid
> http://lists.rails-engines.org/listinfo.cgi/engine...
>


--
* J *
  ~
unknown (Guest)
on 2006-02-11 19:55
(Received via mailing list)
James A. <removed_email_address@domain.invalid> writes:

> unless there's a good reason not to.
>


Thanks James.




>> But where should this call be ideally made? In applications.rb?
>> Read the latest news at: http://news.kreeti.com
>>
>> _______________________________________________
>> engine-users mailing list
>> removed_email_address@domain.invalid
>> http://lists.rails-engines.org/listinfo.cgi/engine...
>>
>
> --
> * J *
>   ~

--
http://ssinghi.kreeti.com, http://www.kreeti.com
Read the latest news at: http://news.kreeti.com
This topic is locked and can not be replied to.