PURIFY
Next-generation radio interferometric imaging
Classes | Namespaces | Macros | Functions
logging.h File Reference
#include "purify/config.h"
#include <cstring>
#include <exception>
#include <map>
#include <memory>
#include <sstream>
#include <string>
#include <tuple>
+ Include dependency graph for logging.h:

Go to the source code of this file.

Classes

class  purify::logging::Log
 Logging system for controlled & formatted writing to stdout. More...
 

Namespaces

 purify
 
 purify::logging
 

Macros

#define PURIFY_MSG_LVL(lvl, ...)
 Neat CPU-conserving logging macros. Use by preference! More...
 
#define PURIFY_LOG_(TYPE, ...)   PURIFY_MSG_LVL(purify::logging::Log::TYPE, __VA_ARGS__)
 \macro For internal use only More...
 
#define PURIFY_CRITICAL(...)   PURIFY_LOG_(critical, __VA_ARGS__)
 \macro Normal but signigicant condition More...
 
#define PURIFY_ERROR(...)   PURIFY_LOG_(error, __VA_ARGS__)
 \macro Something is definitely wrong, algorithm exits More...
 
#define PURIFY_WARN(...)   PURIFY_LOG_(warn, __VA_ARGS__)
 \macro Something might be going wrong More...
 
#define PURIFY_INFO(...)   PURIFY_LOG_(info, __VA_ARGS__)
 
#define PURIFY_DEBUG(...)   PURIFY_LOG_(debug, __VA_ARGS__)
 \macro Output some debugging More...
 
#define PURIFY_TRACE(...)   PURIFY_LOG_(trace, __VA_ARGS__)
 
#define PURIFY_HIGH_LOG(...)   PURIFY_LOG_(critical, __VA_ARGS__)
 High priority message. More...
 
#define PURIFY_MEDIUM_LOG(...)   PURIFY_LOG_(info, __VA_ARGS__)
 Medium priority message. More...
 
#define PURIFY_LOW_LOG(...)   PURIFY_LOG_(debug, __VA_ARGS__)
 Low priority message. More...
 

Functions

ostream & purify::logging::operator<< (Log &log, int level)
 Streaming output to a logger must have a Log::Level/int as its first argument. More...
 
Log & purify::logging::getLog ()
 Access method to default Log object. More...
 
void purify::logging::set_level (const std::string &level)
 Method to set the logging level of the default Log object. More...
 
template<typename Arg >
void purify::logging::applyFormat (std::stringstream &ss, char *&pos, Arg &&arg)
 
template<typename... Args>
std::string purify::logging::mkFormattedString (const char *txt, Args &&... args)
 Helper method to construct formatted string. More...
 
std::string purify::logging::mkFormattedString (const std::string &txt)
 

Macro Definition Documentation

◆ PURIFY_CRITICAL

#define PURIFY_CRITICAL (   ...)    PURIFY_LOG_(critical, __VA_ARGS__)

\macro Normal but signigicant condition

Definition at line 188 of file logging.h.

◆ PURIFY_DEBUG

#define PURIFY_DEBUG (   ...)    PURIFY_LOG_(debug, __VA_ARGS__)

\macro Output some debugging

Definition at line 197 of file logging.h.

◆ PURIFY_ERROR

#define PURIFY_ERROR (   ...)    PURIFY_LOG_(error, __VA_ARGS__)

\macro Something is definitely wrong, algorithm exits

Definition at line 190 of file logging.h.

◆ PURIFY_HIGH_LOG

#define PURIFY_HIGH_LOG (   ...)    PURIFY_LOG_(critical, __VA_ARGS__)

High priority message.

Definition at line 203 of file logging.h.

◆ PURIFY_INFO

#define PURIFY_INFO (   ...)    PURIFY_LOG_(info, __VA_ARGS__)

\macro Informational message about normal condition

Say "Residuals == "

Definition at line 195 of file logging.h.

◆ PURIFY_LOW_LOG

#define PURIFY_LOW_LOG (   ...)    PURIFY_LOG_(debug, __VA_ARGS__)

Low priority message.

Definition at line 207 of file logging.h.

◆ PURIFY_MEDIUM_LOG

#define PURIFY_MEDIUM_LOG (   ...)    PURIFY_LOG_(info, __VA_ARGS__)

Medium priority message.

Definition at line 205 of file logging.h.

◆ PURIFY_TRACE

#define PURIFY_TRACE (   ...)    PURIFY_LOG_(trace, __VA_ARGS__)

\macro Output internal values of no interest to anyone

Except maybe when debugging.

Definition at line 200 of file logging.h.

◆ PURIFY_WARN

#define PURIFY_WARN (   ...)    PURIFY_LOG_(warn, __VA_ARGS__)

\macro Something might be going wrong

Definition at line 192 of file logging.h.