32std::string GNet::EventLoggingContext::m_s ;
38 m_s.assign( s.data() , s.size() ) ;
40 G::LogOutput::Instance::context( EventLoggingContext::fn ,
this ) ;
51 G::LogOutput::Instance::context( EventLoggingContext::fn ,
this ) ;
60 G::LogOutput::Instance::context( EventLoggingContext::fn ,
this ) ;
64void GNet::EventLoggingContext::set( std::string & s ,
EventState es )
69 if( !p->eventLoggingString().empty() )
71 std::string_view sv = p->eventLoggingString() ;
72 s.insert( 0U , sv.data() , sv.size() ) ;
80 G::LogOutput::Instance::context( EventLoggingContext::fn , m_outer ) ;
82 G::LogOutput::Instance::context() ;
86std::string_view GNet::EventLoggingContext::fn(
void * )
88 if( m_inner ==
nullptr )
return {} ;
A class that sets the G::LogOuput::context() while in scope.
~EventLoggingContext()
Destructor. Restores the logging context.
EventLoggingContext(EventState)
Constructor that sets the G::LogOutput logging context to the accumulation of EventLogging::eventLogg...
An interface for GNet classes that define a logging context string.
A lightweight object containing an ExceptionHandler pointer, optional ExceptionSource pointer and opt...
EventState logging(EventLogging *) const noexcept
Returns a copy of this object with the ExceptionLogging pointer set to the given value.