Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
log.cpp
Go to the documentation of this file.
1
// Used for `vinfo` in log.hpp.
2
#include <cstdlib>
3
#include <string>
4
5
#include "
barretenberg/common/log.hpp
"
6
7
#ifndef __wasm__
8
bool
verbose_logging
=
std::getenv
(
"BB_VERBOSE"
) ==
nullptr
? false : std::string(
std::getenv
(
"BB_VERBOSE"
)) ==
"1"
;
9
#else
10
bool
verbose_logging
=
true
;
11
#endif
12
13
// Used for `debug` in log.hpp.
14
bool
debug_logging
=
false
;
15
16
// Used for `log_function` in log.hpp. Defaults to `logstr`.
17
LogFunction
log_function
= [](
LogLevel
/*unused*/
,
const
char
* msg) {
logstr
(msg); };
18
19
void
set_log_function
(
LogFunction
new_log_function)
20
{
21
log_function
=
std::move
(new_log_function);
22
}
log.hpp
LogFunction
std::function< void(LogLevel level, const char *msg)> LogFunction
Definition
log.hpp:69
LogLevel
LogLevel
Definition
log.hpp:61
debug_logging
bool debug_logging
Definition
log.cpp:14
log_function
LogFunction log_function
Definition
log.cpp:17
set_log_function
void set_log_function(LogFunction new_log_function)
Definition
log.cpp:19
verbose_logging
bool verbose_logging
Definition
log.cpp:8
logstr
void logstr(char const *msg)
Definition
logstr.cpp:66
std::get
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition
tuple.hpp:13
src
barretenberg
common
log.cpp
Generated by
1.9.8