Sha256: da6286b313cc45ffd6a483eb022695d89ab8e23662ea1ab55c871431aa222fdd
Contents?: true
Size: 572 Bytes
Versions: 12
Compression:
Stored size: 572 Bytes
Contents
class ServiceSkeleton module LoggingHelpers private def log_exception(ex, progname = nil) progname ||= "#{self.class.to_s}##{caller_locations(2, 1).first.label}" logger.error(progname) do #:nocov: explanation = if block_given? yield else nil end #:nocov: (["#{explanation}#{explanation ? ": " : ""}#{ex.message} (#{ex.class})"] + ex.backtrace).join("\n ") end end def logloc loc = caller_locations.first "#{self.class}##{loc.label}" end end end
Version data entries
12 entries across 12 versions & 1 rubygems