Make it easier to link components that use BeesTrace into test binaries.
Assisted-by: Claude-Code:claude-opus-4-7
Signed-off-by: Zygo Blaxell <bees@furryterror.org>
/// stack unwinding), NOT exceptions that are currently being handled inside a catch block.
bool exception_check();
+/// Suppress BeesTracer output for the current unwind.
+/// Lightweight wrapper for BeesTracer::set_silent() that can be
+/// called without including the full BeesTracer class definition.
+void bees_tracer_set_silent();
+
/// open(2) with bees flag conventions; returns the raw fd or throws.
/// @p flags is @c uint64_t because @c openat2() (the preferred call) uses
/// @c uint64_t in @c open_how. Falls back to @c openat() when @c openat2()
thread_local bool BeesTracer::tl_first = true;
thread_local bool BeesTracer::tl_silent = false;
+void
+bees_tracer_set_silent()
+{
+ BeesTracer::set_silent();
+}
+
BeesTracer::~BeesTracer()
{
if (!tl_silent && exception_check()) {