Loading...
Searching...
No Matches

The class to manage all loggers used in an API instance. More...

#include <gamslog.h>

Public Member Functions

void registerLogger (const LogId logId, const GAMSEnum::DebugLevel debug, FILE *target=stdout)
 
void unregisterLogger (const LogId logId)
 
std::unordered_set< FILE * > targets (const LogId logId, const GAMSEnum::DebugLevel debug) const
 
GAMSEnum::DebugLevel debug (const LogId logId) const
 

Static Public Member Functions

static LoggerPoolinstance ()
 

Detailed Description

The class to manage all loggers used in an API instance.

Definition at line 37 of file gamslog.h.

Member Function Documentation

◆ debug()

GAMSEnum::DebugLevel gams::LoggerPool::debug ( const LogId  logId) const
inline

Get the GAMS debug level for a specific logger.

Parameters
logIdA GAMS logger ID.
Returns
Returns the GAMS debug level of a certain logger.

Definition at line 80 of file gamslog.h.

◆ instance()

static LoggerPool & gams::LoggerPool::instance ( )
static

Get the one and only LoggerPool instance.

Returns
Returns the LoggerPool instance.

◆ registerLogger()

void gams::LoggerPool::registerLogger ( const LogId  logId,
const GAMSEnum::DebugLevel  debug,
FILE *  target = stdout 
)

Register a logger.

Parameters
logIdA GAMS logger ID.
debugA GAMS debug level.
targetThe logger ouput file.

◆ targets()

std::unordered_set< FILE * > gams::LoggerPool::targets ( const LogId  logId,
const GAMSEnum::DebugLevel  debug 
) const
inline

Get all logging targets for a specifc logger.

Parameters
logIdA GAMS logger ID.
debugA GAMS debug level.
Returns
Returns all file targets.

Definition at line 68 of file gamslog.h.

◆ unregisterLogger()

void gams::LoggerPool::unregisterLogger ( const LogId  logId)

Unregister a logger.

Parameters
logIdA logger ID used for unregistration.