log: Details in error messages #16206

issue MarcoFalke opened this issue on June 13, 2019
  1. MarcoFalke commented at 2:19 PM on June 13, 2019: member

    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:

    • Use __func__ for log messages #15981
  2. MarcoFalke added the label Brainstorming on Jun 13, 2019
  3. MarcoFalke added the label Utils/log/libs on Jun 13, 2019
  4. MarcoFalke closed this on May 11, 2020

  5. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me