28#ifndef CRITERION_LOGGING_H_
29#define CRITERION_LOGGING_H_
74#define cr_log_info(...) cr_log(CR_LOG_INFO, __VA_ARGS__)
86#define cr_log_warn(...) cr_log(CR_LOG_WARNING, __VA_ARGS__)
98#define cr_log_error(...) cr_log(CR_LOG_ERROR, __VA_ARGS__)
130 const char *repr,
const char *message);
132 const char *formatted);
144#define CR_NORMAL_LOGGING (&normal_logging)
154 class streambuf :
public std::stringbuf {
157 : std::stringbuf(), severity__(severity__)
160 virtual int sync()
override
162 criterion::logging::log(severity__,
"%s", str().c_str());
186#ifndef CRITERION_NO_COMPAT
188# define criterion_log(_, ...) CR_DEPRECATED("criterion_log is deprecated, please use cr_log instead.") cr_log_info(__VA_ARGS__)
189# define criterion_info(...) CR_DEPRECATED("criterion_info is deprecated, please use cr_log_info instead.") cr_log_info(__VA_ARGS__)
190# define criterion_pinfo(_, ...) CR_DEPRECATED("criterion_pinfo is deprecated, please use cr_log_info instead.") cr_log_info(__VA_ARGS__)
191# define criterion_important(...) CR_DEPRECATED("criterion_important is deprecated, please use cr_log_info instead.") cr_log_info(__VA_ARGS__)
192# define criterion_pimportant(_, ...) CR_DEPRECATED("criterion_pimportant is deprecated, please use cr_log_info instead.") cr_log_info(__VA_ARGS__)
193# define criterion_perror(...) CR_DEPRECATED("criterion_perror is deprecated, please use cr_log_error instead.") cr_log_error(__VA_ARGS__)
#define CR_FORMAT(Archetype, Index, Ftc)
struct criterion_logger normal_logging
CR_API void cr_log(enum criterion_severity severity, const char *msg,...)
@ CRITERION_LOG_LEVEL_QUIET
static void error(LoadState *S, const char *why)
basic_ostream< char, char_traits< char > > ostream
enum cr_log_assert_param_kind kind
void(* log_post_suite)(struct criterion_suite_stats *stats)
void(* log_assert)(struct criterion_assert_stats *stats)
void(* log_assert_param)(struct criterion_assert_stats *stats, struct cr_log_assert_param *param)
void(* log_test_crash)(struct criterion_test_stats *stats)
void(* log_post_test)(struct criterion_test_stats *stats)
void(* log_pre_init)(struct criterion_suite *suite, struct criterion_test *test)
void(* log_abnormal_exit)(struct criterion_test_stats *stats)
void(* log_test_abort)(struct criterion_test_stats *stats, const char *msg)
void(* log_pre_test)(struct criterion_suite *suite, struct criterion_test *test)
void(* log_post_all)(struct criterion_global_stats *stats)
void(* log_message)(enum criterion_severity, const char *msg)
void(* log_other_crash)(struct criterion_test_stats *stats)
void(* log_assert_formatted)(struct criterion_assert_stats *stats, const char *formatted)
void(* log_assert_sub)(struct criterion_assert_stats *stats, const char *repr, const char *message)
void(* log_post_fini)(struct criterion_test_stats *stats)
void(* log_assert_param_eq)(struct criterion_assert_stats *stats, struct cr_log_assert_param *expected, struct cr_log_assert_param *actual)
void(* log_test_timeout)(struct criterion_test_stats *stats)
void(* log_pre_suite)(struct criterion_suite_set *set)
void(* log_pre_all)(struct criterion_test_set *set)
void(* log_theory_fail)(struct criterion_theory_stats *stats)
static void warn(const char *fmt,...)