SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
logging.h
Go to the documentation of this file.
1 /**
2  * @file logging.h
3  * @author Gereon Kremer <gereon.kremer@cs.rwth-aachen.de>
4  */
5 
6 #pragma once
7 
8 #include <carl-logging/carl-logging.h>
9 #include <carl-logging/logging-internals.h>
10 #include <carl-common/util/streamingOperators.h>
11 
12 namespace benchmax {
13 using carl::operator<<;
14 
15 /**
16  * Configure default logging for benchmax.
17  */
18 inline void logging_configure() {
19  carl::logging::logger().configure("stdout", std::cout);
20  carl::logging::logger().filter("stdout")
21  ("benchmax", carl::logging::LogLevel::LVL_INFO)
22  ;
23  carl::logging::logger().resetFormatter();
24 }
25 
26 /**
27  * Configure quiet logging for benchmax.
28  */
29 inline void logging_quiet() {
30  carl::logging::logger().filter("stdout")
31  ("benchmax", carl::logging::LogLevel::LVL_WARN)
32  ;
33 }
34 
35 /**
36  * Configure verbose logging for benchmax.
37  */
38 inline void logging_verbose() {
39  carl::logging::logger().filter("stdout")
40  ("benchmax", carl::logging::LogLevel::LVL_DEBUG)
41  ;
42 }
43 
44 }
45 
46 /// Log fatal errors.
47 #define BENCHMAX_LOG_FATAL(channel, msg) __CARL_LOG_FATAL(channel, msg)
48 /// Log errors.
49 #define BENCHMAX_LOG_ERROR(channel, msg) __CARL_LOG_ERROR(channel, msg)
50 /// Log warnings.
51 #define BENCHMAX_LOG_WARN(channel, msg) __CARL_LOG_WARN(channel, msg)
52 /// Log informational messages.
53 #define BENCHMAX_LOG_INFO(channel, msg) __CARL_LOG_INFO(channel, msg)
54 /// Log debug messages.
55 #define BENCHMAX_LOG_DEBUG(channel, msg) __CARL_LOG_DEBUG(channel, msg)
56 /// Log trace messages.
57 #define BENCHMAX_LOG_TRACE(channel, msg) __CARL_LOG_TRACE(channel, msg)
58 
59 /// Log function call with function arguments.
60 #define BENCHMAX_LOG_FUNC(channel, args) __CARL_LOG_FUNC(channel, args)
61 /// Assert and log an some condition.
62 #define BENCHMAX_LOG_ASSERT(channel, condition, msg) __CARL_LOG_ASSERT(channel, condition, msg)
63 /// Warn about some function not being implemented.
64 #define BENCHMAX_LOG_NOTIMPLEMENTED() __CARL_LOG_ERROR("", "Not implemented method-stub called.")
65 /// Warn about some function being inefficient.
66 #define BENCHMAX_LOG_INEFFICIENT() __CARL_LOG_WARN("", "Inefficient method called.")
67 
void logging_verbose()
Configure verbose logging for benchmax.
Definition: logging.h:38
void logging_quiet()
Configure quiet logging for benchmax.
Definition: logging.h:29
void logging_configure()
Configure default logging for benchmax.
Definition: logging.h:18