CVB++ 15.0
Loading...
Searching...
No Matches

A telemetry module or artifact. More...

#include <cvb/telemetry/module.hpp>

Public Member Functions

bool WouldTrace () const noexcept
 Get if traces are active.
 
bool WouldLog () const noexcept
 Get if logs are active.
 
bool WouldLogDebug () const noexcept
 Get if debug logs are active.
 
bool WouldLogInfo () const noexcept
 Get if info logs are active.
 
bool WouldLogWarning () const noexcept
 Get if warning logs are active.
 
bool WouldLogError () const noexcept
 Get if error logs are active.
 
bool WouldLogFatal () const noexcept
 Get if fatal logs are active.
 

Static Public Member Functions

static ModuleGet ()
 Get the module singleton.
 

Detailed Description

A telemetry module or artifact.

A module represents a instrumented entity that has a dedicated configuration for telemetry. Usually a DLL or shared object or executable. Users must define a singleton instance for their module by using the CVB_TELEMETRY_MODULE macro in a source file. Be aware that multiple module instances may conflict within the same process. The macro takes care of this by using inline namespaces.

Member Function Documentation

◆ Get()

static Module & Get ( )
static

Get the module singleton.

Returns
A module reference
Exceptions
onlyif allocation fails

The module contains the instrumentation configuration as setup.

◆ WouldLog()

bool WouldLog ( ) const
inlinenoexcept

Get if logs are active.

Returns
True if logs are active, false otherwise.
Exceptions
Doesnot throw any exception.

◆ WouldLogDebug()

bool WouldLogDebug ( ) const
inlinenoexcept

Get if debug logs are active.

Returns
True if debug logs are active, false otherwise.
Exceptions
Doesnot throw any exception.

◆ WouldLogError()

bool WouldLogError ( ) const
inlinenoexcept

Get if error logs are active.

Returns
True if error logs are active, false otherwise.
Exceptions
Doesnot throw any exception.

◆ WouldLogFatal()

bool WouldLogFatal ( ) const
inlinenoexcept

Get if fatal logs are active.

Returns
True if fatal logs are active, false otherwise.
Exceptions
Doesnot throw any exception.

◆ WouldLogInfo()

bool WouldLogInfo ( ) const
inlinenoexcept

Get if info logs are active.

Returns
True if info logs are active, false otherwise.
Exceptions
Doesnot throw any exception.

◆ WouldLogWarning()

bool WouldLogWarning ( ) const
inlinenoexcept

Get if warning logs are active.

Returns
True if warning logs are active, false otherwise.
Exceptions
Doesnot throw any exception.

◆ WouldTrace()

bool WouldTrace ( ) const
inlinenoexcept

Get if traces are active.

Returns
True if traces are active, false otherwise.
Exceptions
Doesnot throw any exception.