summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/test/cppsuite/test_harness/debug_utils.h
blob: 1938aabfb5e2baac0b9f68f4b57a67b50e9754c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef DEBUG_UTILS_H
#define DEBUG_UTILS_H

#include <cstdint>
#include <iostream>
#include <string>

/* Define helpful functions related to debugging. */
namespace test_harness {

#define DEBUG_ABORT -1
#define DEBUG_ERROR 0
#define DEBUG_INFO 1

static int64_t _trace_level = 0;

/* Used to print out traces for debugging purpose. */
static void
debug_info(const std::string &str, int64_t trace_threshold, int64_t trace_level)
{
    if (trace_threshold >= trace_level)
        std::cout << str << std::endl;
}

} // namespace test_harness

#endif