![]() |
SOPT
Sparse OPTimisation
|
Classes | |
class | Log |
Logging system for controlled & formatted writing to stdout. More... | |
Functions | |
void | _updateLevels (const Log::LevelMap &defaultLevels, Log::LogMap &existingLogs) |
ostream & | operator<< (Log &log, int level) |
Streaming output to a logger must have a Log::Level/int as its first argument. More... | |
Log & | getLog () |
Access method to default Log object. More... | |
void | set_level (const std::string &level) |
Method to set the logging level of the default Log object. More... | |
template<typename Arg > | |
void | applyFormat (std::stringstream &ss, char *&pos, Arg &&arg) |
template<typename... Args> | |
std::string | mkFormattedString (const char *txt, Args &&... args) |
Helper method to construct formatted string. More... | |
const std::string & | mkFormattedString (const std::string &txt) |
void sopt::logging::_updateLevels | ( | const Log::LevelMap & | defaultLevels, |
Log::LogMap & | existingLogs | ||
) |
Definition at line 30 of file logging.cc.
Referenced by sopt::logging::Log::setLevels().
void sopt::logging::applyFormat | ( | std::stringstream & | ss, |
char *& | pos, | ||
Arg && | arg | ||
) |
Helper method to ireplace a set of curly braces with the template argument arg in a string stream
Definition at line 162 of file logging.h.
References SOPT_THROW.
Referenced by mkFormattedString().
|
inline |
Access method to default Log object.
Definition at line 151 of file logging.h.
References sopt::logging::Log::getLog().
Referenced by set_level().
|
inline |
Helper method to construct formatted string.
Definition at line 175 of file logging.h.
References applyFormat().
|
inline |
std::ostream & sopt::logging::operator<< | ( | Log & | log, |
int | level | ||
) |
Streaming output to a logger must have a Log::Level/int as its first argument.
The streaming operator can use Log's internals.
Definition at line 190 of file logging.cc.
|
inline |
Method to set the logging level of the default Log object.
Definition at line 154 of file logging.h.
References sopt::logging::Log::getLevelFromName(), getLog(), and sopt::logging::Log::setLevel().
Referenced by main(), and TEST_CASE().