Skip to content

Instantly share code, notes, and snippets.

@tal
Created May 10, 2011 15:13
Show Gist options
  • Save tal/964657 to your computer and use it in GitHub Desktop.
Save tal/964657 to your computer and use it in GitHub Desktop.
A fast and easy way to make logs
module Log
LOGS = Hash.new {|h,k| h[k] = Logger.new("log/#{k}.log")}
extend self
def method_missing name
LOGS[name]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment