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() | |
void | init_memory() Initialise dynamic memory required for thread safety. |
void | initialise(std::vector< std::pair< std::set< std::string >, std::string > > & loggerinfo) Function to construct loggers according to blueprint. |
void | initialise(std::map< std::set< std::string >, std::string > & loggerinfo) |
void | initialise(std::map< std::string, std::string > & loggerinfo) |
void | disable() |
bool | disabled() |
void | enable() |
void | emit_backlog(bool verbose) Print the backlogs to the default log file. |
void | input(const std::string & in) Functions for stream input (actual stream operators which use these are defined in logger.cpp) |
void | input(const LogTag & tag) Handle LogTag input. |
void | input(const endofmessage & ) Handle end of message character. |
void | input(const manip1) Handle various stream manipulators. |
void | input(const manip2) |
void | input(const manip3) |
void | send(const std::string & message) Main logging function (user-friendly overloaded version) |
void | send(const std::string & message, LogTag tag1) |
void | send(const std::string & message, LogTag tag1, LogTag tag2) |
void | send(const std::string & message, LogTag tag1, LogTag tag2, LogTag tag3) |
void | send(const std::string & message, LogTag tag1, LogTag tag2, LogTag tag3, LogTag tag4) |
void | send(const std::string & message, LogTag tag1, LogTag tag2, LogTag tag3, LogTag tag4, LogTag tag5) |
void | send(const std::ostringstream & message) stringstream versions…. |
void | send(const std::ostringstream & message, LogTag tag1) |
void | send(const std::ostringstream & message, LogTag tag1, LogTag tag2) |
void | send(const std::ostringstream & message, LogTag tag1, LogTag tag2, LogTag tag3) |
void | send(const std::ostringstream & message, LogTag tag1, LogTag tag2, LogTag tag3, LogTag tag4) |
void | send(const std::ostringstream & message, LogTag tag1, LogTag tag2, LogTag tag3, LogTag tag4, LogTag tag5) |
void | send(const std::string & message, std::set< LogTag > & tags) Internal version of main logging function. |
void | send(const std::string & message, std::set< int > & tags) Serious version of main logging function. |
void | finalsend(const Message & mail) Version of send function used by buffer dump; skips all the tag modification stuff. |
void | send(const std::ostringstream & message, std::set< LogTag > & tags) stringstream overloads… |
void | send(const std::ostringstream & message, std::set< int > & tags) |
void | entering_module(int i) Set the internal variables tracking which module and/or backend is currently running. |
void | leaving_module() |
void | entering_backend(int i) |
void | leaving_backend() |
void | set_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 2024-07-18 at 13:53:31 +0000