Rails makes use of ruby’s standard logger, Log4r, or another logger that provides a similar interface can also be substituted if you wish.
A logger object is made available to each of ActiveRecord, ActionController and ActionMailer.
From within a controller, model or mailer:
logger.info "Starting process fubar..."
See HowtoAccessTheLogFile for more examples.
By default Rails will keep one log file for each environment (Environments). The log files can be found in the /log directory under the root of your application.
See HowtoConfigureLogging for details.