Skip to content

Instantly share code, notes, and snippets.

@cantin
Forked from zernel/gist:3749856
Created October 23, 2012 05:43
Show Gist options
  • Save cantin/3936965 to your computer and use it in GitHub Desktop.
Save cantin/3936965 to your computer and use it in GitHub Desktop.
Logger
file = File.join(Rails.root, 'log/markdown.log')
File.new(file, 'w+') unless File.exist?(file)
logger = Logger.new(file)
logger.info("#{Time.now}: Share##{_id}'s price is from #{latest_price} to #{new_price}")
logger.close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment