I have a fair number of files in the rails “lib” directory. These
files don’t have visibility into the “logger” class instance that comes
automatically with rails controllers and models. How do I include this
functionality into my “lib” files?
Thanks,
phil
On Sep 12, 2006, at 3:29 PM, [email protected] wrote:
I have a fair number of files in the rails “lib” directory. These
files don’t have visibility into the “logger” class instance that
comes
automatically with rails controllers and models. How do I include
this
functionality into my “lib” files?
Thanks,
phil
You can use RAILS_DEFAULT_LOGGER in your lib code. Or add a method
like this:
def logger
RAILS_DEFAULT_LOGGER
end
-Ezra