Sha256: 5623ecf1f362c3dc418cd7b00bda7e1ed6a078a46edc0c69c38592669622eb79

Contents?: true

Size: 567 Bytes

Versions: 3

Compression:

Stored size: 567 Bytes

Contents

# frozen_string_literal: true

module Sentry
  module LoggingHelper
    def log_error(message, exception, debug: false)
      message = "#{message}: #{exception.message}"
      message += "\n#{exception.backtrace.join("\n")}" if debug

      logger.error(LOGGER_PROGNAME) do
        message
      end
    end

    def log_info(message)
      logger.info(LOGGER_PROGNAME) { message }
    end

    def log_debug(message)
      logger.debug(LOGGER_PROGNAME) { message }
    end

    def log_warn(message)
      logger.warn(LOGGER_PROGNAME) { message }
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sentry-ruby-core-4.8.3 lib/sentry/utils/logging_helper.rb
sentry-ruby-core-4.8.2 lib/sentry/utils/logging_helper.rb
sentry-ruby-core-4.8.1 lib/sentry/utils/logging_helper.rb