Manticore
Version 1.5.3
Physics of Molecular Clouds
|
Declares diagnostic message macros. More...
Go to the source code of this file.
Classes | |
struct | mutils::Log |
Logging facility. More... | |
Namespaces | |
mutils | |
MathUtils package. | |
Macros | |
#define | MU_DEBUG(src, msg, ...) MU_MESSAGE(mutils::Log::DEBUG, src, msg, ## __VA_ARGS__) |
Log a message at level Log::DEBUG. More... | |
#define | MU_DEBUG_IF(cond, src, msg, ...) MU_MESSAGE_IF(mutils::Log::DEBUG, cond, src, msg, ## __VA_ARGS__) |
Conditionally log a message at level Log::DEBUG. More... | |
#define | MU_DEBUG_RTN(rtn, cond, src, msg, ...) MU_MESSAGE_RTN(mutils::Log::DEBUG, rtn, cond, src, msg, ## __VA_ARGS__) |
Conditionally log a message at level Log::DEBUG (with return). More... | |
#define | MU_ERRNO_IF(cond, src, msg, ...) |
Conditionally log a message at level Log::ERROR (with errno). More... | |
#define | MU_ERRNO_RTN(rtn, cond, src, msg, ...) |
Conditionally log a message at level Log::ERRROR (with errno and return). More... | |
#define | MU_ERROR(src, msg, ...) MU_MESSAGE(mutils::Log::ERROR, src, msg, ## __VA_ARGS__) |
Log a message at level Log::ERROR. More... | |
#define | MU_ERROR_IF(cond, src, msg, ...) MU_MESSAGE_IF(mutils::Log::ERROR, cond, src, msg, ## __VA_ARGS__) |
Conditionally log a message at level Log::ERROR. More... | |
#define | MU_ERROR_RTN(rtn, cond, src, msg, ...) MU_MESSAGE_RTN(mutils::Log::ERROR, rtn, cond, src, msg, ## __VA_ARGS__) |
Conditionally log a message at level Log::ERROR (with return). More... | |
#define | MU_INFO(src, msg, ...) MU_MESSAGE(mutils::Log::INFO, src, msg, ## __VA_ARGS__) |
Log a message at level Log::INFO. More... | |
#define | MU_INFO_IF(cond, src, msg, ...) MU_MESSAGE_IF(mutils::Log::INFO, cond, src, msg, ## __VA_ARGS__) |
Conditionally log a message at level Log::INFO. More... | |
#define | MU_INFO_RTN(rtn, cond, src, msg, ...) MU_MESSAGE_RTN(mutils::Log::INFO, rtn, cond, src, msg, ## __VA_ARGS__) |
Conditionally log a message at level Log::INFO (with return). More... | |
#define | MU_MESSAGE(lev, src, msg, ...) |
Uniform messaging macro with variable debug level. More... | |
#define | MU_MESSAGE_IF(lev, cond, src, msg, ...) |
Conditionally log a message at specific level. More... | |
#define | MU_MESSAGE_RTN(lev, rtn, cond, src, msg, ...) |
Conditionally log a message at a specific level (with return). More... | |
#define | MU_WARN(src, msg, ...) MU_MESSAGE(mutils::Log::WARN, src, msg, ## __VA_ARGS__) |
Log a message at level Log::WARN. More... | |
#define | MU_WARN_IF(cond, src, msg, ...) MU_MESSAGE_IF(mutils::Log::WARN, cond, src, msg, ## __VA_ARGS__) |
Conditionally log a message at level Log::WARN. More... | |
#define | MU_WARN_RTN(rtn, cond, src, msg, ...) MU_MESSAGE_RTN(mutils::Log::WARN, rtn, cond, src, msg, ## __VA_ARGS__) |
Conditionally log a message at level Log::WARN (with return). More... | |
Functions | |
const char * | mutils::Cform (const std::string &s) |
Converts input to well-defined type for stdio. More... | |
template<typename T > | |
T * | mutils::Cform (T *p) |
Converts input to well-defined type for stdio. More... | |
double | mutils::Cform (double i) |
Converts input to well-defined type for stdio. More... | |
unsigned long | mutils::Cform (unsigned long long i) |
Converts input to well-defined type for stdio. More... | |
unsigned long | mutils::Cform (unsigned long i) |
Converts input to well-defined type for stdio. More... | |
unsigned long | mutils::Cform (unsigned i) |
Converts input to well-defined type for stdio. More... | |
long | mutils::Cform (long long i) |
Converts input to well-defined type for stdio. More... | |
long | mutils::Cform (long i) |
Converts input to well-defined type for stdio. More... | |
long | mutils::Cform (int i) |
Converts input to well-defined type for stdio. More... | |
int | mutils::Cform (unsigned char i) |
Converts input to well-defined type for stdio. More... | |
int | mutils::Cform (char i) |
Converts input to well-defined type for stdio. More... | |
int | mutils::cxxfclose (FILE *fp) |
Standardized fclose(). More... | |
FILE * | mutils::cxxfopen (const std::string &file, const char *mode) |
Standardized fopen(). More... | |
template<typename... Args> | |
int | mutils::cxxfprintf (FILE *f, Args &&... args) |
C fprintf() with type conversion (not safety). More... | |
template<typename... Args> | |
int | mutils::cxxprintf (Args &&... args) |
C printf() with type conversion (not safety). More... | |
template<typename... Args> | |
int | mutils::cxxsnprintf (char *buf, size_t len, Args &&... args) |
C snprintf() with type conversion (not safety). More... | |
Declares diagnostic message macros.
Author: Kevin P. Rauch <rauch> @ast ro.um d.ed u
Definition in file Log.h.
#define MU_DEBUG | ( | src, | |
msg, | |||
... | |||
) | MU_MESSAGE(mutils::Log::DEBUG, src, msg, ## __VA_ARGS__) |
Log a message at level Log::DEBUG.
[in] | src | Source name (program or method). |
[in] | msg | Debug message (must be a literal string constant). |
[in] | ... | Arguments to satisfy msg mutils::cxxprintf directives. |
#define MU_DEBUG_IF | ( | cond, | |
src, | |||
msg, | |||
... | |||
) | MU_MESSAGE_IF(mutils::Log::DEBUG, cond, src, msg, ## __VA_ARGS__) |
Conditionally log a message at level Log::DEBUG.
[in] | cond | Failure test condition. |
[in] | src | Source name (program or method). |
[in] | msg | Error message (must be a literal string constant). |
[in] | ... | Arguments to satisfy msg mutils::cxxprintf directives. |
#define MU_DEBUG_RTN | ( | rtn, | |
cond, | |||
src, | |||
msg, | |||
... | |||
) | MU_MESSAGE_RTN(mutils::Log::DEBUG, rtn, cond, src, msg, ## __VA_ARGS__) |
Conditionally log a message at level Log::DEBUG (with return).
[in] | rtn | Failure return value. |
[in] | cond | Failure test condition. |
[in] | src | Source name (program or method). |
[in] | msg | Error message (must be a literal string constant). |
[in] | ... | Arguments to satisfy msg mutils::cxxprintf directives. |
#define MU_ERRNO_IF | ( | cond, | |
src, | |||
msg, | |||
... | |||
) |
Conditionally log a message at level Log::ERROR (with errno).
[in] | cond | Failure test condition. |
[in] | src | Source name (program or method). |
[in] | msg | Error message (must be a literal string constant). |
[in] | ... | Arguments to satisfy msg mutils::cxxprintf directives. |
#define MU_ERRNO_RTN | ( | rtn, | |
cond, | |||
src, | |||
msg, | |||
... | |||
) |
Conditionally log a message at level Log::ERRROR (with errno and return).
[in] | rtn | Failure return value. |
[in] | cond | Failure test condition. |
[in] | src | Source name (program or method). |
[in] | msg | Error message (must be a literal string constant). |
[in] | ... | Arguments to satisfy msg mutils::cxxprintf directives. |
#define MU_ERROR | ( | src, | |
msg, | |||
... | |||
) | MU_MESSAGE(mutils::Log::ERROR, src, msg, ## __VA_ARGS__) |
Log a message at level Log::ERROR.
[in] | src | Source name (program or method). |
[in] | msg | Debug message (must be a literal string constant). |
[in] | ... | Arguments to satisfy msg mutils::cxxprintf directives. |
#define MU_ERROR_IF | ( | cond, | |
src, | |||
msg, | |||
... | |||
) | MU_MESSAGE_IF(mutils::Log::ERROR, cond, src, msg, ## __VA_ARGS__) |
Conditionally log a message at level Log::ERROR.
[in] | cond | Failure test condition. |
[in] | src | Source name (program or method). |
[in] | msg | Error message (must be a literal string constant). |
[in] | ... | Arguments to satisfy msg mutils::cxxprintf directives. |
#define MU_ERROR_RTN | ( | rtn, | |
cond, | |||
src, | |||
msg, | |||
... | |||
) | MU_MESSAGE_RTN(mutils::Log::ERROR, rtn, cond, src, msg, ## __VA_ARGS__) |
Conditionally log a message at level Log::ERROR (with return).
[in] | rtn | Failure return value. |
[in] | cond | Failure test condition. |
[in] | src | Source name (program or method). |
[in] | msg | Error message (must be a literal string constant). |
[in] | ... | Arguments to satisfy msg mutils::cxxprintf directives. |
#define MU_INFO | ( | src, | |
msg, | |||
... | |||
) | MU_MESSAGE(mutils::Log::INFO, src, msg, ## __VA_ARGS__) |
Log a message at level Log::INFO.
[in] | src | Source name (program or method). |
[in] | msg | Debug message (must be a literal string constant). |
[in] | ... | Arguments to satisfy msg mutils::cxxprintf directives. |
#define MU_INFO_IF | ( | cond, | |
src, | |||
msg, | |||
... | |||
) | MU_MESSAGE_IF(mutils::Log::INFO, cond, src, msg, ## __VA_ARGS__) |
Conditionally log a message at level Log::INFO.
[in] | cond | Failure test condition. |
[in] | src | Source name (program or method). |
[in] | msg | Error message (must be a literal string constant). |
[in] | ... | Arguments to satisfy msg mutils::cxxprintf directives. |
#define MU_INFO_RTN | ( | rtn, | |
cond, | |||
src, | |||
msg, | |||
... | |||
) | MU_MESSAGE_RTN(mutils::Log::INFO, rtn, cond, src, msg, ## __VA_ARGS__) |
Conditionally log a message at level Log::INFO (with return).
[in] | rtn | Failure return value. |
[in] | cond | Failure test condition. |
[in] | src | Source name (program or method). |
[in] | msg | Error message (must be a literal string constant). |
[in] | ... | Arguments to satisfy msg mutils::cxxprintf directives. |
#define MU_MESSAGE | ( | lev, | |
src, | |||
msg, | |||
... | |||
) |
Uniform messaging macro with variable debug level.
[in] | lev | Message Log::Level. |
[in] | src | Source name (program or method). |
[in] | msg | Debug message (must be a literal string constant). |
[in] | ... | Arguments to satisfy msg mutils::cxxprintf directives. |
#define MU_MESSAGE_IF | ( | lev, | |
cond, | |||
src, | |||
msg, | |||
... | |||
) |
Conditionally log a message at specific level.
[in] | lev | Message log level. |
[in] | cond | Failure test condition. |
[in] | src | Source name (program or method). |
[in] | msg | Error message (must be a literal string constant). |
[in] | ... | Arguments to satisfy msg mutils::cxxprintf directives. |
#define MU_MESSAGE_RTN | ( | lev, | |
rtn, | |||
cond, | |||
src, | |||
msg, | |||
... | |||
) |
Conditionally log a message at a specific level (with return).
[in] | lev | Message log level. |
[in] | rtn | Failure return value. |
[in] | cond | Failure test condition. |
[in] | src | Source name (program or method). |
[in] | msg | Error message (must be a literal string constant). |
[in] | ... | Arguments to satisfy msg mutils::cxxprintf directives. |
#define MU_WARN | ( | src, | |
msg, | |||
... | |||
) | MU_MESSAGE(mutils::Log::WARN, src, msg, ## __VA_ARGS__) |
Log a message at level Log::WARN.
[in] | src | Source name (program or method). |
[in] | msg | Debug message (must be a literal string constant). |
[in] | ... | Arguments to satisfy msg mutils::cxxprintf directives. |
#define MU_WARN_IF | ( | cond, | |
src, | |||
msg, | |||
... | |||
) | MU_MESSAGE_IF(mutils::Log::WARN, cond, src, msg, ## __VA_ARGS__) |
Conditionally log a message at level Log::WARN.
[in] | cond | Failure test condition. |
[in] | src | Source name (program or method). |
[in] | msg | Error message (must be a literal string constant). |
[in] | ... | Arguments to satisfy msg mutils::cxxprintf directives. |
#define MU_WARN_RTN | ( | rtn, | |
cond, | |||
src, | |||
msg, | |||
... | |||
) | MU_MESSAGE_RTN(mutils::Log::WARN, rtn, cond, src, msg, ## __VA_ARGS__) |
Conditionally log a message at level Log::WARN (with return).
[in] | rtn | Failure return value. |
[in] | cond | Failure test condition. |
[in] | src | Source name (program or method). |
[in] | msg | Error message (must be a literal string constant). |
[in] | ... | Arguments to satisfy msg mutils::cxxprintf directives. |