 |
preCICE v3.2.0
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
6#define PRECICE_LOG_LOCATION \
7 precice::logging::LogLocation \
9 __FILE__, __LINE__, __func__ \
12#define PRECICE_WARN(...) _log.warning(PRECICE_LOG_LOCATION, precice::utils::format_or_error(__VA_ARGS__))
14#define PRECICE_INFO(...) _log.info(PRECICE_LOG_LOCATION, precice::utils::format_or_error(__VA_ARGS__))
16#define PRECICE_ERROR(...) ::precice::logging::logErrorAndThrow<::precice::Error>(_log, PRECICE_LOG_LOCATION, precice::utils::format_or_error(__VA_ARGS__))
18#define PRECICE_WARN_IF(condition, ...) \
21 PRECICE_WARN(__VA_ARGS__); \
25#define PRECICE_INFO_IF(condition, ...) \
28 PRECICE_INFO(__VA_ARGS__); \
32#define PRECICE_CHECK(check, ...) \
35 PRECICE_ERROR(__VA_ARGS__); \
42#if defined(NDEBUG) && !defined(PRECICE_RELEASE_WITH_DEBUG_LOG)
43#define PRECICE_NO_DEBUG_LOG
46#ifdef PRECICE_NO_DEBUG_LOG
50#define PRECICE_DEBUG(...) \
51 ::precice::utils::ignore(__VA_ARGS__)
53#define PRECICE_DEBUG_IF(...) \
54 ::precice::utils::ignore(__VA_ARGS__)
56#define PRECICE_TRACE(...) \
57 ::precice::utils::ignore(__VA_ARGS__)
61#define PRECICE_DEBUG(...) _log.debug(PRECICE_LOG_LOCATION, precice::utils::format_or_error(__VA_ARGS__))
63#define PRECICE_DEBUG_IF(condition, ...) \
66 PRECICE_DEBUG(__VA_ARGS__); \
75#if defined(NDEBUG) && !defined(PRECICE_RELEASE_WITH_TRACE_LOG)
76#define PRECICE_NO_TRACE_LOG
79#ifdef PRECICE_NO_TRACE_LOG
83#define PRECICE_TRACE(...) \
84 ::precice::utils::ignore(__VA_ARGS__)
92#define PRECICE_TRACE(...) \
93 precice::logging::Tracer _tracer_(_log, PRECICE_LOG_LOCATION); \
94 _log.trace(PRECICE_LOG_LOCATION, std::string{"Entering "} + __func__ + PRECICE_LOG_ARGUMENTS(__VA_ARGS__))