Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x] Add context recursively #37890

Closed
wants to merge 2 commits into from
Closed

[8.x] Add context recursively #37890

wants to merge 2 commits into from

Conversation

lucasmichot
Copy link
Contributor

It is a pretty common practice to group pieces of context into a main data group when logging.
It makes it easier to manage filters when using a logging solution, like loggly, papertrail, etc...

At the moment adding context does not allow to do it in a recursive manner.

This PR introduces this possibility.

$writer->error('foo', ['payload' => ['type' => 'cli']]);
}

public function testContextIsRemovedFromAllSubsequentLogs()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also add a test for withoutContext.

@driesvints
Copy link
Member

See #37860

@lucasmichot
Copy link
Contributor Author

Ah such a pity @driesvints , withContext is pretty unusable without nesting

🤞 for 9.x then

@lucasmichot lucasmichot closed this Jul 2, 2021
@lucasmichot lucasmichot deleted the feature/8.x-recursive-with-context branch August 6, 2022 13:53
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