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

Allow for overriding get-backtrace #193

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

Conversation

tdrhq
Copy link
Contributor

@tdrhq tdrhq commented May 7, 2021

On Lispworks, the default trivial-backtrace output is super verbose, with all the variables displayed. Now this is fine for development, but on production this is is still logged to stdout even if it isn't show to users. This can cause two things: a) it makes my logs grow fast if there's an error, and b) it might log sensitive information to disk in clear text.

This PR just allows that to be overriden. It doesn't change the default behavior. My intended use is to override this just in production to only log the backtrace without the bindings. Perhaps even do more complicated things like remove specific bindings from the output.

@stassats
Copy link
Member

stassats commented May 7, 2021

Why a new function and not just changing get-backtrace?

@tdrhq
Copy link
Contributor Author

tdrhq commented May 7, 2021

@stassats The conditions.lisp file wasn't dependent on any acceptor related code, so it made sense to keep it that way. I would have to move the get-backtrace to somewhere after the acceptor class is defined, which felt unnatural. (EDIT: I wouldn't have to move it after the acceptor class is defined, because the defmethod doesn't use the acceptor class. But it still felt wrong to take an acceptor argument that is unused.)

@stassats
Copy link
Member

stassats commented May 7, 2021

Moving code around is perfectly natural. So, I would accept: a method named get-backtrace and exported. And currently the documentation says "A method", while it's attached to a generic function.

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.

None yet

2 participants