Taking output from a program and writing it to the end of a file (or other IO)
Easy way to track output from a running program, especially handy for long running processes like web servers
puts vs logger
cat, less, grep
tail -f tail -500 less
Logger - Ruby stdlib class ActiveSupport extends it via Rails.logger
Logging gem
great, more robust replacement
:debug, :info, :warn, :error, :fatal, :unknown 0, 1, 2, 3, 4, 5 default is debug
config.log_level = :warn (in application.rb or environment initializers) Rails.logger.level = 0
watch out for disk space rake log:clear log rotation logrotate SyslogLogger.new
Not like other environments since no long term storage. Does offer short-term logging, also add-ons for better logging support
heroku logs -t Papertrail add-on Logentries add-on
There is a logging-rails gem which provides a generator for inserting
logging
into a rails application.