class Gambit::Logging::LogMaster

[No description available] More…

#include <logmaster.hpp>

Public Functions

Name
LogMaster()
Default constructor.
LogMaster(std::map< std::set< int >, BaseLogger * > & loggersIN)
Alternate constructor.
~LogMaster()
voidinit_memory()
Initialise dynamic memory required for thread safety.
voidinitialise(std::vector< std::pair< std::set< std::string >, std::string > > & loggerinfo)
Function to construct loggers according to blueprint.
voidinitialise(std::map< std::set< std::string >, std::string > & loggerinfo)
voidinitialise(std::map< std::string, std::string > & loggerinfo)
voiddisable()
booldisabled()
voidenable()
voidemit_backlog(bool verbose)
Print the backlogs to the default log file.
voidinput(const std::string & in)
Functions for stream input (actual stream operators which use these are defined in logger.cpp)
voidinput(const LogTag & tag)
Handle LogTag input.
voidinput(const endofmessage & )
Handle end of message character.
voidinput(const manip1)
Handle various stream manipulators.
voidinput(const manip2)
voidinput(const manip3)
voidsend(const std::string & message)
Main logging function (user-friendly overloaded version)
voidsend(const std::string & message, LogTag tag1)
voidsend(const std::string & message, LogTag tag1, LogTag tag2)
voidsend(const std::string & message, LogTag tag1, LogTag tag2, LogTag tag3)
voidsend(const std::string & message, LogTag tag1, LogTag tag2, LogTag tag3, LogTag tag4)
voidsend(const std::string & message, LogTag tag1, LogTag tag2, LogTag tag3, LogTag tag4, LogTag tag5)
voidsend(const std::ostringstream & message)
stringstream versions….
voidsend(const std::ostringstream & message, LogTag tag1)
voidsend(const std::ostringstream & message, LogTag tag1, LogTag tag2)
voidsend(const std::ostringstream & message, LogTag tag1, LogTag tag2, LogTag tag3)
voidsend(const std::ostringstream & message, LogTag tag1, LogTag tag2, LogTag tag3, LogTag tag4)
voidsend(const std::ostringstream & message, LogTag tag1, LogTag tag2, LogTag tag3, LogTag tag4, LogTag tag5)
voidsend(const std::string & message, std::set< LogTag > & tags)
Internal version of main logging function.
voidsend(const std::string & message, std::set< int > & tags)
Serious version of main logging function.
voidfinalsend(const Message & mail)
Version of send function used by buffer dump; skips all the tag modification stuff.
voidsend(const std::ostringstream & message, std::set< LogTag > & tags)
stringstream overloads…
voidsend(const std::ostringstream & message, std::set< int > & tags)
voidentering_module(int i)
Set the internal variables tracking which module and/or backend is currently running.
voidleaving_module()
voidentering_backend(int i)
voidleaving_backend()
voidset_log_debug_messages(bool flag)
Choose whether “Debug” tagged log messages will be ignored (i.e. not logged)

Detailed Description

class Gambit::Logging::LogMaster;

Logging “controller” object Keeps track of the various “Logger” objects

Public Functions Documentation

function LogMaster

LogMaster()

Default constructor.

Logger class member function definitions.

Logging “controller” object Keeps track of the individual logging objects.

function LogMaster

LogMaster(
    std::map< std::set< int >, BaseLogger * > & loggersIN
)

Alternate constructor.

Alternate constructor Mainly for testing; lets you pass in pre-built loggers and their tags

function ~LogMaster

~LogMaster()

Destructor If errors happen before the inifile is loaded, we need to dump the log messages (that have been buffered) into a default log file. These will be log messages coming from initialisation code and so on.

function init_memory

void init_memory()

Initialise dynamic memory required for thread safety.

function initialise

void initialise(
    std::vector< std::pair< std::set< std::string >, std::string > > & loggerinfo
)

Function to construct loggers according to blueprint.

function initialise

void initialise(
    std::map< std::set< std::string >, std::string > & loggerinfo
)

function initialise

void initialise(
    std::map< std::string, std::string > & loggerinfo
)

function disable

void disable()

function disabled

bool disabled()

function enable

void enable()

function emit_backlog

void emit_backlog(
    bool verbose
)

Print the backlogs to the default log file.

function input

void input(
    const std::string & in
)

Functions for stream input (actual stream operators which use these are defined in logger.cpp)

Handle strings.

function input

void input(
    const LogTag & tag
)

Handle LogTag input.

function input

void input(
    const endofmessage & 
)

Handle end of message character.

function input

void input(
    const manip1
)

Handle various stream manipulators.

function input

void input(
    const manip2
)

function input

void input(
    const manip3
)

function send

void send(
    const std::string & message
)

Main logging function (user-friendly overloaded version)

function send

void send(
    const std::string & message,
    LogTag tag1
)

function send

void send(
    const std::string & message,
    LogTag tag1,
    LogTag tag2
)

function send

void send(
    const std::string & message,
    LogTag tag1,
    LogTag tag2,
    LogTag tag3
)

function send

void send(
    const std::string & message,
    LogTag tag1,
    LogTag tag2,
    LogTag tag3,
    LogTag tag4
)

function send

void send(
    const std::string & message,
    LogTag tag1,
    LogTag tag2,
    LogTag tag3,
    LogTag tag4,
    LogTag tag5
)

function send

void send(
    const std::ostringstream & message
)

stringstream versions….

function send

void send(
    const std::ostringstream & message,
    LogTag tag1
)

function send

void send(
    const std::ostringstream & message,
    LogTag tag1,
    LogTag tag2
)

function send

void send(
    const std::ostringstream & message,
    LogTag tag1,
    LogTag tag2,
    LogTag tag3
)

function send

void send(
    const std::ostringstream & message,
    LogTag tag1,
    LogTag tag2,
    LogTag tag3,
    LogTag tag4
)

function send

void send(
    const std::ostringstream & message,
    LogTag tag1,
    LogTag tag2,
    LogTag tag3,
    LogTag tag4,
    LogTag tag5
)

function send

void send(
    const std::string & message,
    std::set< LogTag > & tags
)

Internal version of main logging function.

function send

void send(
    const std::string & message,
    std::set< int > & tags
)

Serious version of main logging function.

function finalsend

void finalsend(
    const Message & mail
)

Version of send function used by buffer dump; skips all the tag modification stuff.

function send

void send(
    const std::ostringstream & message,
    std::set< LogTag > & tags
)

stringstream overloads…

function send

void send(
    const std::ostringstream & message,
    std::set< int > & tags
)

function entering_module

void entering_module(
    int i
)

Set the internal variables tracking which module and/or backend is currently running.

function leaving_module

void leaving_module()

function entering_backend

void entering_backend(
    int i
)

function leaving_backend

void leaving_backend()

function set_log_debug_messages

inline void set_log_debug_messages(
    bool flag
)

Choose whether “Debug” tagged log messages will be ignored (i.e. not logged)

Setters for behaviour options Must be used before “initialise” in order to have any effect Choose whether a separate log file for each MPI process is used NOW FORBIDDEN! Always must be true to avoid concurrent write access issues void set_separate_file_per_process(bool flag) {separate_file_per_process=flag;}


Updated on 2023-06-26 at 21:36:52 +0000