Skip to content

Allow for overriding get-backtrace#193

Open
tdrhq wants to merge 1 commit into
edicl:masterfrom
tdrhq:get-backtrace
Open

Allow for overriding get-backtrace#193
tdrhq wants to merge 1 commit into
edicl:masterfrom
tdrhq:get-backtrace

Conversation

@tdrhq

@tdrhq tdrhq commented May 7, 2021

Copy link
Copy Markdown
Contributor

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

stassats commented May 7, 2021

Copy link
Copy Markdown
Member

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

@tdrhq

tdrhq commented May 7, 2021

Copy link
Copy Markdown
Contributor Author

@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

stassats commented May 7, 2021

Copy link
Copy Markdown
Member

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.

2 participants