Skip to content

Commit

Permalink
Added method_missing for defining log levels as methods.
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://rubyforge.org/var/svn/alogr/trunk@5 5d4fd1e0-7adf-40a7-adde-e9af6235188f
  • Loading branch information
wayneeseguin committed Sep 17, 2007
1 parent d4b06f4 commit 8c7fc84
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 149 deletions.
149 changes: 0 additions & 149 deletions ext/aio_logger/Makefile

This file was deleted.

Binary file removed ext/aio_logger/aio_logger.bundle
Binary file not shown.
9 changes: 9 additions & 0 deletions lib/alogr.rb
Expand Up @@ -44,6 +44,15 @@ def log(string, level = default_log_level)
$alogr_buffer << [level, string]
end

def method_missing(meth, *options)
puts "method: #{meth.inspect}, options: #{options.inspect}"
if AlogR::Levels.include?( meth )
log(meth, options.first)
else
super.method_missing(meth, *options)
end
end

end
end

Expand Down

0 comments on commit 8c7fc84

Please sign in to comment.