Created
May 10, 2011 15:13
-
-
Save tal/964657 to your computer and use it in GitHub Desktop.
A fast and easy way to make logs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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