Skip to content

Instantly share code, notes, and snippets.

@tal
Created November 29, 2010 19:49
Show Gist options
  • Select an option

  • Save tal/720473 to your computer and use it in GitHub Desktop.

Select an option

Save tal/720473 to your computer and use it in GitHub Desktop.
module QikLog
def self.method_missing meth
unless logger = instance_variable_get(:"@#{meth}")
logger = Logger.new(File.join('log',"#{meth}.log"))
instance_variable_set(:"@#{meth}", logger)
end
logger
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment