Sha256: 45e472e9ee271bc5c018ea3aabc856a3c6074d9f4a2559a835c98d1e02f7bf8b
Contents?: true
Size: 586 Bytes
Versions: 19
Compression:
Stored size: 586 Bytes
Contents
require 'active_support/core_ext/module/aliasing' require 'roqua/support/log_wrapper' module Roqua module Logging def self.included(base) base.extend ClassMethods end module ClassMethods def log(method_name, message, options = {}) define_method(:"#{method_name}_with_log") do |*args, &block| eventlog.lifecycle(message, options) do send(:"#{method_name}_without_log", *args, &block) end end alias_method_chain method_name, 'log' end end def eventlog Roqua.logger end end end
Version data entries
19 entries across 19 versions & 1 rubygems