Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
debug_log.cpp
Go to the documentation of this file.
1#include "debug_log.hpp"
2#include <cstdlib>
3#include <stdexcept>
4#include <string>
5#ifdef BBERG_DEBUG_LOG
6namespace barretenberg {
7void _debug_log_impl(const std::string& log_str)
8{
9 const char* abort_cond = std::getenv("DEBUG_LOG_ABORT");
10 if (abort_cond != nullptr && log_str.find(abort_cond) != std::string::npos) {
11 throw std::runtime_error("Abort condition met: " + log_str);
12 }
13 if (abort_cond == nullptr) {
14 std::cout << log_str << std::endl;
15 }
16}
17} // namespace barretenberg
18#endif
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13