Sha256: 984091e835516594a22a6c87262444416f51d4bc18f60480d7e823e7188e22e6

Contents?: true

Size: 571 Bytes

Versions: 55

Compression:

Stored size: 571 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

55 entries across 55 versions & 2 rubygems

Version Path
sentry-ruby-core-5.17.3 lib/sentry/utils/logging_helper.rb
sentry-ruby-5.17.3 lib/sentry/utils/logging_helper.rb
sentry-ruby-5.17.2 lib/sentry/utils/logging_helper.rb
sentry-ruby-core-5.17.2 lib/sentry/utils/logging_helper.rb
sentry-ruby-core-5.17.1 lib/sentry/utils/logging_helper.rb
sentry-ruby-5.17.1 lib/sentry/utils/logging_helper.rb
sentry-ruby-5.17.0 lib/sentry/utils/logging_helper.rb
sentry-ruby-core-5.17.0 lib/sentry/utils/logging_helper.rb
sentry-ruby-core-5.16.1 lib/sentry/utils/logging_helper.rb
sentry-ruby-5.16.1 lib/sentry/utils/logging_helper.rb
sentry-ruby-5.16.0 lib/sentry/utils/logging_helper.rb
sentry-ruby-core-5.16.0 lib/sentry/utils/logging_helper.rb
sentry-ruby-5.15.2 lib/sentry/utils/logging_helper.rb
sentry-ruby-core-5.15.2 lib/sentry/utils/logging_helper.rb
sentry-ruby-core-5.15.1 lib/sentry/utils/logging_helper.rb
sentry-ruby-5.15.1 lib/sentry/utils/logging_helper.rb
sentry-ruby-5.15.0 lib/sentry/utils/logging_helper.rb
sentry-ruby-core-5.15.0 lib/sentry/utils/logging_helper.rb
sentry-ruby-5.14.0 lib/sentry/utils/logging_helper.rb
sentry-ruby-core-5.14.0 lib/sentry/utils/logging_helper.rb