Skip to content

Fix handle the case where the logger messages is not of String type#1341

Merged
st0012 merged 3 commits into
getsentry:masterfrom
fumitti:patch-1
Mar 17, 2021
Merged

Fix handle the case where the logger messages is not of String type#1341
st0012 merged 3 commits into
getsentry:masterfrom
fumitti:patch-1

Conversation

@fumitti

@fumitti fumitti commented Mar 16, 2021

Copy link
Copy Markdown
Contributor

Description

Passing something other (like Integer) than a String type to the logger will fail because there is no "empty?" method.
Fixed based on old raven source
https://github.com/getsentry/sentry-ruby/blob/master/sentry-raven/lib/raven/breadcrumbs/sentry_logger.rb#L22

@st0012 st0012 added this to the sentry-ruby-4.3.1 milestone Mar 17, 2021
@st0012

st0012 commented Mar 17, 2021

Copy link
Copy Markdown
Contributor

@fumitti thanks for catching this and making this PR 😄

@st0012
st0012 merged commit 0f1129a into getsentry:master Mar 17, 2021
@fumitti
fumitti deleted the patch-1 branch March 17, 2021 06:03
@justi

justi commented Mar 18, 2021

Copy link
Copy Markdown

@fumitti thanks for the fix. I've notice the same bug and temporary fix is replacing sentry_logger with active_support_logger
config.breadcrumbs_logger = %i[active_support_logger]

st0012 pushed a commit that referenced this pull request Mar 19, 2021
…1341)

* Fix handle the case where the message is not of String type

* add logger test

* Update CHANGELOG.md
st0012 pushed a commit that referenced this pull request Mar 20, 2021
…1341)

* Fix handle the case where the message is not of String type

* add logger test

* Update CHANGELOG.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants