Sha256: 4da98cbeb9394c322b86622d055bf560c0e0437526b64707877eab326ec7a81b

Contents?: true

Size: 481 Bytes

Versions: 11

Compression:

Stored size: 481 Bytes

Contents

module Workers
  module Helpers
    def log_debug(msg, e = nil)
      @logger.debug(concat_e(msg, e))
    end

    def log_info(msg, e = nil)
      @logger.info(concat_e(msg, e))
    end

    def log_warn(msg, e = nil)
      @logger.warn(concat_e(msg, e))
    end

    def log_error(msg, e = nil)
      @logger.error(concat_e(msg, e))
    end

    def concat_e(msg, e = nil)
      return e ? "#{msg}\nEXCEPTION: #{e.message}\n#{e.backtrace.join("\n")}\n--" : msg
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
workers-0.1.1 lib/workers/helpers.rb
workers-0.1.0 lib/workers/helpers.rb
workers-0.0.9 lib/workers/helpers.rb
workers-0.0.8 lib/workers/helpers.rb
workers-0.0.7 lib/workers/helpers.rb
workers-0.0.6 lib/workers/helpers.rb
workers-0.0.5 lib/workers/helpers.rb
workers-0.0.4 lib/workers/helpers.rb
workers-0.0.3 lib/workers/helpers.rb
workers-0.0.2 lib/workers/helpers.rb
workers-0.0.1 lib/workers/helpers.rb