Entropic 2.3.8
Local-first agentic inference engine
Loading...
Searching...
No Matches
entropic::log::HandleLogScope Class Reference

gh#59 (v2.3.1): RAII guard — sets thread's current handle_id. More...

#include <entropic/types/logging.h>

Public Member Functions

 HandleLogScope (int handle_id)
 Enter scope; sets thread current handle_id.
 
 ~HandleLogScope ()
 Exit scope; restores previous handle_id.
 
 HandleLogScope (const HandleLogScope &)=delete
 
HandleLogScopeoperator= (const HandleLogScope &)=delete
 

Detailed Description

gh#59 (v2.3.1): RAII guard — sets thread's current handle_id.

Construct at the top of every entropic_* API function so that any log line emitted on this thread (directly or via subsystems called from this thread) routes to this handle's session.log via the HandleAwareSink. Nestable — saves/restores the previous id.

Cross-thread: when spawning a background thread that should log on a handle's behalf (external_bridge serve threads), wrap the thread body in another HandleLogScope.

Definition at line 154 of file logging.h.

Constructor & Destructor Documentation

◆ HandleLogScope()

entropic::log::HandleLogScope::HandleLogScope ( int  handle_id)
explicit

Enter scope; sets thread current handle_id.

gh#59 RAII enter — see header.

Parameters
handle_idThe id to bind for this thread.
Returns
n/a (constructor).
Version
2.3.1

@utility

Version
2.3.1

Definition at line 549 of file logging.cpp.

◆ ~HandleLogScope()

entropic::log::HandleLogScope::~HandleLogScope ( )

Exit scope; restores previous handle_id.

gh#59 RAII exit — see header.

Returns
n/a (destructor).
Version
2.3.1

@utility

Version
2.3.1

Definition at line 559 of file logging.cpp.


The documentation for this class was generated from the following files: