Sha256: b3e2c9f2a2c1f3f75f186108a28491f7f5c0a44f516b4ce349c14d495e2f9774
Contents?: true
Size: 730 Bytes
Versions: 21
Compression:
Stored size: 730 Bytes
Contents
class Marty::Logger include Delorean::Model def self.method_missing(m, *args, &block) return super unless [:debug, :info, :warn, :error, :fatal, :unknown].include?(m) Marty::Util.logger.send(m, args[0]) if Marty::Util.logger.respond_to?(m) log(m, *args) end def self.log(type, message, details=nil) Marty::Log.write_log(type, message, details) end def self.with_logging(error_message, error_data) begin yield rescue => e error(error_message, { "message" => e.message, "data" => error_data}) raise "#{error_message}: #{e.message}" end end delorean_fn :dllog, sig: [2, 20] do |*args| info args[0], args[1..-1] end end
Version data entries
21 entries across 21 versions & 1 rubygems