Skip to content

Conversation

@mrtus
Copy link
Contributor

@mrtus mrtus commented Jul 7, 2023

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Describe the solution you've provided

Various logging tools can generate a stack trace based on the exception being on the 'exception' key in the logging context. See PSR-3

Describe alternatives you've considered

We could keep the debug log but since this introduces duplicate logging and does not provide a browsable context of the exception, it is better to remove this.

I am a bit conflicted about keeping $e->getMessage() as part of the error message, since this becomes redundant with the same reason as before, many logging tools simply use the exception on the logging context already and use it as a message.

mrtus added 2 commits July 7, 2023 16:46
By logging the exception on the context various logging tools can generate a stack trace
@mrtus mrtus marked this pull request as ready for review July 7, 2023 14:52
@louis-launchdarkly
Copy link
Contributor

Hello @mrtus, thank you for the contribution. We will review this and get back to you after that.

Filed Internally as 209083.

@keelerm84 keelerm84 changed the base branch from main to contrib July 11, 2023 17:03
@keelerm84 keelerm84 merged commit baa271d into launchdarkly:contrib Jul 11, 2023
LaunchDarklyReleaseBot added a commit that referenced this pull request Jul 12, 2023
## [5.1.1] - 2023-07-11
### Changed:
- Invalid context log message now includes the flag key as part of the
Psr\Log context. (Thanks,
[mrtus](#179)!)
- Error logging now includes the exception in the Psr\Log exception
context key. (Thanks,
[mrtus](#177)!)

---------

Co-authored-by: Eli Bishop <[email protected]>
Co-authored-by: hroederld <[email protected]>
Co-authored-by: LaunchDarklyCI <[email protected]>
Co-authored-by: Ben Woskow <[email protected]>
Co-authored-by: Ben Woskow <[email protected]>
Co-authored-by: Gavin Whelan <[email protected]>
Co-authored-by: elliot <[email protected]>
Co-authored-by: Elliot Haisley <[email protected]>
Co-authored-by: Harpo Roeder <[email protected]>
Co-authored-by: LaunchDarklyReleaseBot <[email protected]>
Co-authored-by: Ember Stevens <[email protected]>
Co-authored-by: ember-stevens <[email protected]>
Co-authored-by: Matthew M. Keeler <[email protected]>
Co-authored-by: charukiewicz <[email protected]>
Co-authored-by: Joey Malinowski <[email protected]>
Co-authored-by: Christian Charukiewicz <[email protected]>
Co-authored-by: Matthew M. Keeler <[email protected]>
Co-authored-by: Colin Henwood <[email protected]>
Co-authored-by: Colin Henwood <[email protected]>
Co-authored-by: Eli Bishop <[email protected]>
Co-authored-by: Louis Chan <[email protected]>
Co-authored-by: ld-repository-standards[bot] <113625520+ld-repository-standards[bot]@users.noreply.github.com>
Co-authored-by: Kane Parkinson <[email protected]>
Co-authored-by: Michiel Devriese <[email protected]>
@keelerm84
Copy link
Member

Released in 5.1.1

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.

3 participants