Skip to content

Instantly share code, notes, and snippets.

@zernel
Created September 19, 2012 14:03
Show Gist options
  • Save zernel/3749856 to your computer and use it in GitHub Desktop.
Save zernel/3749856 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