Logging in Rails outside a controller

August 25, 2009 by Michael

You can use

RAILS_DEFAULT_LOGGER.log "foobar"
# or
Rails.logger.log "blah"

outside a controller for logging.

No comments yet

Post a Comment

Your email is never published nor shared. Required fields are marked *