carl
24.04
Computer ARithmetic Library
|
The frontend for logging is defined in logging.h.
It provides the following macros for logging:
Where the arguments mean the following:
channel
: A string describing the context. For example "carl.core"
.msg
: The actual message as an expression that can be sent to a std::stringstream. For example "foo: " << foo
.args
: A description of the function arguments as an expression like msg
.condition
: A boolean expression that can be passed to assert()
.Typically, logging looks like this:
Logging is enabled (or disabled) by the LOGGING
macro in CMake.
As of now, there is no frontend interface to configure logging. Hence, configuration is performed directly on the backend.
As of now, only two logging backends exist.
CArL provides a custom logging mechanism defined in carl::logging.
If logging is enabled, but no real logging backend is selected, all logging of level WARN
or above goes to std::cerr
.