-
Notifications
You must be signed in to change notification settings - Fork 10
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
An idea: Make the body of log:* safe if a condition is signalled in its body. #47
Comments
The current behavior has been explicitly designed by the original author with the intention of making it easy for users to debug problems in log statements. The main mechanism is Lines 560 to 589 in fe3da51
log4cl/tests/test-appenders.lisp Lines 344 to 370 in fe3da51
I can see benefits of the current behavior as well as of the behavior you are suggesting. It seems the best solution would be a configuration option or special variable to select one of the behaviors similar to the way the fiveam library provides |
This is just an idea but this is a problem I have run into a few times and its more of a safe guard for programmer error than anything. But a common use case I have for log:* is to display a condition using the built in reporting ie (define-condition .. (:report ...)) but sometimes something like a slot might not be bound etc and a form like
Will cause everything to go kaboom if there is a failure on the programmers part to fill the slots correctly in
condition
A quick fix I have just tried is to wrap the actual printing of the condition into a macro that will catch any problems and return a different string but it seems fitting that log:* should have a fallback message in the case that the body of log:* signals a condition.
Does this already exist? If not how does it sound as a potential feature?
Thanks.
The text was updated successfully, but these errors were encountered: