]> git.hungrycats.org Git - bees/commit
trace: document BEESTRACE auto-prefix in the doxygen comment
authorZygo Blaxell <bees@furryterror.org>
Sat, 30 May 2026 17:37:04 +0000 (13:37 -0400)
committerZygo Blaxell <bees@furryterror.org>
Sat, 5 Sep 2026 04:03:57 +0000 (00:03 -0400)
commit70d4f1894dc3d9bc88477ae93d53dc752cc2c72c
tree27ea50caa9350e310f6d4024adb3b945fb79dcf5
parentbe2974c8cef2e20cfd72b0c5e17b59bf1c03f360
trace: document BEESTRACE auto-prefix in the doxygen comment

The BEESTRACE macro already injects __FUNCTION__ as a prefix and
__FILE__:__LINE__ as a suffix on the rendered trace line, but the
existing doxygen comment described only the RAII semantics.  Callers
unfamiliar with the macro's expansion would routinely add a redundant
"__FUNCTION__ << \": \"" to the body (carried over from BEESLOG* and
BEESNOTE, neither of which prefixes the function name) and produce
doubled output like "foo: foo: ref ...".

Expand the comment to:

  - state explicitly that __FUNCTION__ and __FILE__:__LINE__ are
    injected automatically, so the argument supplies only the
    call-site payload;
  - show an @code example demonstrating the right form and its
    rendered output;
  - add an @warning admonition that explicitly rejects
    `BEESTRACE(__FUNCTION__ << ": " << ...)` and contrasts the macro
    with BEESLOG / BEESNOTE.

Comment-only change; no behavior or generated code is affected.

Assisted-by: Claude-Code:claude-opus-4-7
Signed-off-by: Zygo Blaxell <bees@furryterror.org>
src/bees.h