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

Log.error(exception: exception) {} is a no-op #15221

Open
oprypin opened this issue Nov 24, 2024 · 0 comments
Open

Log.error(exception: exception) {} is a no-op #15221

oprypin opened this issue Nov 24, 2024 · 0 comments
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib:log

Comments

@oprypin
Copy link
Member

oprypin commented Nov 24, 2024

In my codebase a long time ago I had a line Log.error(exception: exception) {} in order to print an exception.
But now this line simply does nothing.

To work around this, I had to change this to Log.error(exception: exception) { "" }

This behavior should be specced / documented / fixed. To me this behavior doesn't make sense. Why would I pass the exception arg, other than if I expect it to be printed

@oprypin oprypin added the kind:bug A bug in the code. Does not apply to documentation, specs, etc. label Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib:log
Projects
None yet
Development

No branches or pull requests

2 participants