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: Details in error messages #16206

Closed
maflcko opened this issue Jun 13, 2019 · 0 comments
Closed

log: Details in error messages #16206

maflcko opened this issue Jun 13, 2019 · 0 comments

Comments

@maflcko
Copy link
Member

maflcko commented Jun 13, 2019

Error messages generally consist of a reason that explains what happened. However some of them contain more details such as the function name. This is problematic when the function name changes and the reason string is unique enough to find the exact line in the source code based on the debug log.

Most error messages are already unique and we should probably not put the function name (or similar) in them and instead make sure that they don't change otherwise.

If for some reason it is helpful to include the function name (or line number, file name, ...), it should probably go at the end of the log message in braces. E.g. LogPrintf("Init failed due to coding error (DEBUG: Init(), init.cpp:1234)");.

Not sure about that, so opening a brainstorming issue.

See also:

@maflcko maflcko closed this as completed May 11, 2020
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant