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 overloads for logging exceptions without giving a block #15257

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lachlan
Copy link
Contributor

@lachlan lachlan commented Dec 7, 2024

Per the discussion on #15221 and #15253, this change provides non-yielding overloads to the Log.{{severity}} methods for logging exceptions without giving an associated message producing block:

# previously a block was required to log a bare exception without a 
# message, like so:
Log.error(exception: ex) { "" }

# this change provides non-yielding overloads to log bare exceptions 
# without requiring an empty block, which is a little easier for this 
# use case:
Log.error(exception: ex)

Per the discussion on crystal-lang#15221, this change provides non-yielding
overloads to the `Log.{{severity}}` methods for logging exceptions
without giving an associated message producing block.
@straight-shoota straight-shoota added this to the 1.15.0 milestone Dec 13, 2024
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.

4 participants