Tomographer
v5.4
Tomographer C++ Framework Documentation
|
Tomographer's Logging Framework More...
Enumerations | |
enum | LogLevelCode |
Possible logging levels. More... | |
Functions | |
std::istream & | operator>> (std::istream &str, LogLevel &l) |
C++ input stream operator for LogLevel. | |
std::ostream & | operator<< (std::ostream &str, const LogLevel &l) |
C++ output stream operator for LogLevel. | |
bool | isAtLeastOfSeverity (int level, int baselevel) |
Helper to compare severity levels. More... | |
template<typename BaseLoggerType > | |
LocalLogger< BaseLoggerType > | makeLocalLogger (std::string origin_fn_name, BaseLoggerType &baselogger) |
Create a local logger. More... | |
template<typename BaseLoggerType > | |
LocalLogger< BaseLoggerType > | makeLocalLogger (std::string origin_prefix, std::string glue, BaseLoggerType &baselogger) |
Create a local logger. More... | |
template<typename BaseLoggerType > | |
LocalLogger< BaseLoggerType > | makeLocalLogger (const LocalLoggerOriginSpec &spec, BaseLoggerType &baselogger) |
Create a local logger. More... | |
Tomographer's Logging Framework
Possible logging levels.
Don't trust the numeric values here, they may change at any time. Just the order is important.
Enumerator | |
---|---|
ERROR | Error logging level. A log message with this level signifies that a critical error has occurred which prevents further processing. The program is about to terminate. |
WARNING | Warning logging level. A log message with this level signifies a warning for the user. The computation may continue, but most likely the user provided erroneous input, a routine may have failed to reach the required precision, or there are features which will not be available. |
INFO | Information logging level. Log messages with the |
DEBUG | Debug logging level. More verbose information, meant to debug either the input data or the The |
LONGDEBUG | Long Debug logging level. This level is meant to signify very specific messages, such as infomation about individual iterations. The log produced with this level may be very long an no longer readable on a terminal. Use this level for messages that are generated very often. |
HIGHEST_SEVERITY_LEVEL | Highest severity possible. Don't use as a level. Use, rather, as value e.g. for LoggerTraits::StaticMinimumSeverityLevel. |
LOWEST_SEVERITY_LEVEL | Lowest severity possible. Don't use as a level. Use, rather, as value e.g. for LoggerTraits::StaticMinimumSeverityLevel. |
|
inline |
Helper to compare severity levels.
Returns true
if the given level is at least as severe (equal severity or higher severity) as baselevel (for example, if level == Logger::ERROR
and baselevel == Logger::INFO
).
Just to make sure we don't confuse the numerical ordering of the levels, we should always use this helper function to see whether a level is at least of a given severity.
|
inline |
Create a local logger.
This function is useful to avoid having to repeat the base logger's type, by using C++'s auto
keyword as well as automatic template argument deduction:
The above code is equivalent to
Each overload of makeLocalLogger() calls the matching LocalLogger constructor. As in the example above, you may use TOMO_ORIGIN as the origin argument.
|
inline |
Create a local logger.
This function overload provides the same functionality as makeLocalLogger(std::string,BaseLoggerType&), but simply calls the other corresponding constructor.
|
inline |
Create a local logger.
This function overload provides the same functionality as makeLocalLogger(std::string,BaseLoggerType&), but simply calls the other corresponding constructor.