Module: Rfd::Logging

Defined in:
lib/rfd/logging.rb

Class Method Summary collapse

Class Method Details

.included(m) ⇒ Object



24
25
26
27
28
29
30
31
32
# File 'lib/rfd/logging.rb', line 24

def self.included(m)
  mod = Module.new do
    (m.instance_methods - Object.instance_methods).each do |meth|
      Rfd.logger.info meth
      define_method(meth) {|*args, &block| Rfd.logger.debug "calling #{meth}(#{args.inspect})"; super(*args, &block) }
    end
  end
  m.prepend mod
end