|
CAEN Utility
2.0.2
Utilities for CAEN projects
|
Log related macros. More...
Macros | |
| #define | INIT_C_LOGGER(fname, mname) static const c_locallogger_t __locallogger = { (fname), (mname) } |
| #define | vlogMsg(s, format, args) c_lvprintf(&(__locallogger), (s), (format), (args)) |
| #define | logMsg(s, ...) c_lprintf(&(__locallogger), (s), __LINE__, __VA_ARGS__) |
Log related macros.
| #define INIT_C_LOGGER | ( | fname, | |
| mname | |||
| ) | static const c_locallogger_t __locallogger = { (fname), (mname) } |
Define a static instance of c_locallogger_t, setting the filename and the module tree.
| [in] | fname | the filename |
| [in] | mname | the module tree |
Definition at line 139 of file CAENLogger.h.
| #define vlogMsg | ( | s, | |
| format, | |||
| args | |||
| ) | c_lvprintf(&(__locallogger), (s), (format), (args)) |
Wrapper to c_lvprintf(), with a reference to the local logger initialized by INIT_C_LOGGER() added as first parameter.
| [in] | s | the severity mask |
| [in] | format | string that contains a format string that follows the same specifications as format in printf |
| [in] | args | a variable arguments list initialized with va_start |
Definition at line 148 of file CAENLogger.h.
| #define logMsg | ( | s, | |
| ... | |||
| ) | c_lprintf(&(__locallogger), (s), __LINE__, __VA_ARGS__) |
Wrapper to c_lprintf(), with a reference to the local logger initialized by INIT_C_LOGGER() added as first parameter.
format must be included in the "__VA_ARGS__" to avoid warnings in "gcc -std=c99 -pedantic" complaining about at least one variadic argument | [in] | s | the filename |
| [in] | ... | the format, followed by an optional sequence of additional arguments. |
Definition at line 157 of file CAENLogger.h.