Skip to content

Instantly share code, notes, and snippets.

@objo
Created February 25, 2009 16:22
Show Gist options
  • Save objo/70258 to your computer and use it in GitHub Desktop.
Save objo/70258 to your computer and use it in GitHub Desktop.
require 'logger'
$log = Logger.new(File.join(File.dirname(__FILE__), '..', 'log', 'nwms.log'))
$log.formatter = Logger::Formatter.new
$log.datetime_format = "%Y-%m-%d"
class Object
def log
$log
end
end
log.info { "Initialized logger" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment