Github User Fetcher 1.0.0
C Application with Server and GUI
|
Logging functions. More...
#include "internal/common.h"
#include "internal/ordered-set.h"
#include "internal/deprecation.h"
#include "stats.h"
Go to the source code of this file.
Data Structures | |
struct | cr_log_assert_param |
struct | criterion_logger |
Macros | |
#define | cr_log_info(...) cr_log(CR_LOG_INFO, __VA_ARGS__) |
#define | cr_log_warn(...) cr_log(CR_LOG_WARNING, __VA_ARGS__) |
#define | cr_log_error(...) cr_log(CR_LOG_ERROR, __VA_ARGS__) |
#define | CR_NORMAL_LOGGING (&normal_logging) |
#define | criterion_log(_, ...) CR_DEPRECATED("criterion_log is deprecated, please use cr_log instead.") cr_log_info(__VA_ARGS__) |
#define | criterion_info(...) CR_DEPRECATED("criterion_info is deprecated, please use cr_log_info instead.") cr_log_info(__VA_ARGS__) |
#define | criterion_pinfo(_, ...) CR_DEPRECATED("criterion_pinfo is deprecated, please use cr_log_info instead.") cr_log_info(__VA_ARGS__) |
#define | criterion_important(...) CR_DEPRECATED("criterion_important is deprecated, please use cr_log_info instead.") cr_log_info(__VA_ARGS__) |
#define | criterion_pimportant(_, ...) CR_DEPRECATED("criterion_pimportant is deprecated, please use cr_log_info instead.") cr_log_info(__VA_ARGS__) |
#define | criterion_perror(...) CR_DEPRECATED("criterion_perror is deprecated, please use cr_log_error instead.") cr_log_error(__VA_ARGS__) |
Enumerations | |
enum | criterion_logging_level { CRITERION_INFO = 1 , CRITERION_IMPORTANT , CRITERION_LOG_LEVEL_QUIET = 1 << 30 } |
enum | criterion_severity { CR_LOG_INFO , CR_LOG_WARNING , CR_LOG_ERROR } |
enum | cr_log_assert_param_kind { CR_LOG_PARAM_STR , CR_LOG_PARAM_RAW } |
Functions | |
CR_API void | cr_log (enum criterion_severity severity, const char *msg,...) |
Variables | |
struct criterion_logger | normal_logging |
Logging functions.
Definition in file logging.h.
#define cr_log_error | ( | ... | ) | cr_log(CR_LOG_ERROR, __VA_ARGS__) |
Prints a error message
Call: cr_log_error(msg, ...)
Prints a error message defined by msg and the following optional parameters
[in] | msg | printf like format string |
[in] | ... | Additional arguments depending on msg |
#define cr_log_info | ( | ... | ) | cr_log(CR_LOG_INFO, __VA_ARGS__) |
Prints a info message
Call: cr_log_info(msg, ...)
Prints a info message defined by msg and the following optional parameters
[in] | msg | printf like format string |
[in] | ... | Additional arguments depending on msg |
#define cr_log_warn | ( | ... | ) | cr_log(CR_LOG_WARNING, __VA_ARGS__) |
Prints a warning message
Call: cr_log_warn(msg, ...)
Prints a warning message defined by msg and the following optional parameters
[in] | msg | printf like format string |
[in] | ... | Additional arguments depending on msg |
#define CR_NORMAL_LOGGING (&normal_logging) |
#define criterion_important | ( | ... | ) | CR_DEPRECATED("criterion_important is deprecated, please use cr_log_info instead.") cr_log_info(__VA_ARGS__) |
#define criterion_info | ( | ... | ) | CR_DEPRECATED("criterion_info is deprecated, please use cr_log_info instead.") cr_log_info(__VA_ARGS__) |
#define criterion_log | ( | _, | |
... ) CR_DEPRECATED("criterion_log is deprecated, please use cr_log instead.") cr_log_info(__VA_ARGS__) |
#define criterion_perror | ( | ... | ) | CR_DEPRECATED("criterion_perror is deprecated, please use cr_log_error instead.") cr_log_error(__VA_ARGS__) |
#define criterion_pimportant | ( | _, | |
... ) CR_DEPRECATED("criterion_pimportant is deprecated, please use cr_log_info instead.") cr_log_info(__VA_ARGS__) |
#define criterion_pinfo | ( | _, | |
... ) CR_DEPRECATED("criterion_pinfo is deprecated, please use cr_log_info instead.") cr_log_info(__VA_ARGS__) |
Enumerator | |
---|---|
CR_LOG_PARAM_STR | |
CR_LOG_PARAM_RAW |
Enumerator | |
---|---|
CRITERION_INFO | |
CRITERION_IMPORTANT | |
CRITERION_LOG_LEVEL_QUIET |
enum criterion_severity |
Enumerator | |
---|---|
CR_LOG_INFO | |
CR_LOG_WARNING | |
CR_LOG_ERROR |
CR_API void cr_log | ( | enum criterion_severity | severity, |
const char * | msg, | ||
... ) |
Prints a log message
One can use this function, but it is more convenient to use the 3 macros.
[in] | severity | Severity level of the log message |
[in] | msg | printf like format string |
[in] | ... | Additional arguments depending on msg |
|
extern |