mirror of
https://github.com/Z3Prover/z3
synced 2025-09-08 02:31:24 +00:00
misc
This commit is contained in:
parent
aee07d0496
commit
bcde2844b2
5 changed files with 36 additions and 4 deletions
|
@ -27,6 +27,19 @@ char const* color_reset();
|
|||
#if POLYSAT_LOGGING_ENABLED
|
||||
|
||||
void set_log_enabled(bool log_enabled);
|
||||
bool get_log_enabled();
|
||||
|
||||
class scoped_set_log_enabled {
|
||||
bool m_prev;
|
||||
public:
|
||||
scoped_set_log_enabled(bool enabled) {
|
||||
m_prev = get_log_enabled();
|
||||
set_log_enabled(enabled);
|
||||
}
|
||||
~scoped_set_log_enabled() {
|
||||
set_log_enabled(m_prev);
|
||||
}
|
||||
};
|
||||
|
||||
class polysat_log_indent
|
||||
{
|
||||
|
@ -94,6 +107,8 @@ polysat_log(LogLevel msg_level, std::string fn, std::string pretty_fn);
|
|||
#else // POLYSAT_LOGGING_ENABLED
|
||||
|
||||
inline void set_log_enabled(bool) {}
|
||||
inline bool get_log_enabled() { return false; }
|
||||
class scoped_set_log_enabled {};
|
||||
|
||||
#define LOG_(lvl, x) \
|
||||
do { \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue