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

Add Log.with_context with kwargs #11517

Merged

Conversation

caspiano
Copy link
Contributor

@caspiano caspiano commented Nov 30, 2021

This allows for temporary context to be set via Log.with_context(**context, &block).

EDIT: Added support for Log.with_context(value, &block), thanks for catching that @Sija

Closes #11347

This allows for temporary context to be set via
`Log.with_context(**context, &block)`.
@Sija
Copy link
Contributor

Sija commented Dec 1, 2021

Perhaps it's worth adding Hash overloads too?

@caspiano
Copy link
Contributor Author

caspiano commented Dec 2, 2021

Added the Hash overload @Sija 👍

@caspiano
Copy link
Contributor Author

caspiano commented Dec 9, 2021

@oprypin reckon this can make its way into 1.3.0 🥺

Copy link
Member

@beta-ziliani beta-ziliani left a comment

Choose a reason for hiding this comment

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

Thanks for improving the specs 🚀

@beta-ziliani beta-ziliani added this to the 1.3.0 milestone Dec 9, 2021
@straight-shoota straight-shoota merged commit 903ebe6 into crystal-lang:master Dec 10, 2021
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.

Allow Log.with_context to set context
4 participants