Skip to content

Restore event logger to payload#1657

Merged
cleptric merged 3 commits intogetsentry:masterfrom
mfb:event-logger
Dec 13, 2023
Merged

Restore event logger to payload#1657
cleptric merged 3 commits intogetsentry:masterfrom
mfb:event-logger

Conversation

@mfb
Copy link
Copy Markdown
Contributor

@mfb mfb commented Dec 8, 2023

The Event::setLogger() and Event::getLogger() methods still exist, but it seems they no longer add the logger to the event payload. As a result, when an event is sent to Sentry, the JSON shows "logger":"" - empty string, rather than the value that was passed to Event::setLogger().

As far as how Event::setLogger() is used, it's not just me. The Monolog handler has $event->setLogger(sprintf('monolog.%s', $record['channel']));

@mfb mfb mentioned this pull request Dec 8, 2023
Copy link
Copy Markdown
Member

@cleptric cleptric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mfb
Copy link
Copy Markdown
Contributor Author

mfb commented Dec 11, 2023

It looks like there was a test for this, but it was removed in 6ba2a2c

Feel free to work on this if anyone has time/interest, otherwise it's on my list.. :)

@mfb
Copy link
Copy Markdown
Contributor Author

mfb commented Dec 13, 2023

@cleptric ok, I restored the test to PayloadSerializerTest

Copy link
Copy Markdown
Member

@cleptric cleptric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@cleptric cleptric enabled auto-merge (squash) December 13, 2023 18:46
@cleptric cleptric merged commit 9984963 into getsentry:master Dec 13, 2023
@cleptric
Copy link
Copy Markdown
Member

Shipped in 4.2.0

@FeBe95 FeBe95 mentioned this pull request Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants