|
preCICE v3.1.2
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
5#define PRECICE_LOG_LOCATION \
6 precice::logging::LogLocation \
8 __FILE__, __LINE__, __func__ \
11#define PRECICE_WARN(...) _log.warning(PRECICE_LOG_LOCATION, precice::utils::format_or_error(__VA_ARGS__))
13#define PRECICE_INFO(...) _log.info(PRECICE_LOG_LOCATION, precice::utils::format_or_error(__VA_ARGS__))
15#define PRECICE_ERROR(...) \
17 _log.error(PRECICE_LOG_LOCATION, precice::utils::format_or_error(__VA_ARGS__)); \
21#define PRECICE_WARN_IF(condition, ...) \
24 PRECICE_WARN(__VA_ARGS__); \
28#define PRECICE_INFO_IF(condition, ...) \
31 PRECICE_INFO(__VA_ARGS__); \
35#define PRECICE_CHECK(check, ...) \
38 PRECICE_ERROR(__VA_ARGS__); \
45#if defined(NDEBUG) && !defined(PRECICE_RELEASE_WITH_DEBUG_LOG)
46#define PRECICE_NO_DEBUG_LOG
49#ifdef PRECICE_NO_DEBUG_LOG
53#define PRECICE_DEBUG(...) \
54 ::precice::utils::ignore(__VA_ARGS__)
56#define PRECICE_DEBUG_IF(...) \
57 ::precice::utils::ignore(__VA_ARGS__)
59#define PRECICE_TRACE(...) \
60 ::precice::utils::ignore(__VA_ARGS__)
64#define PRECICE_DEBUG(...) _log.debug(PRECICE_LOG_LOCATION, precice::utils::format_or_error(__VA_ARGS__))
66#define PRECICE_DEBUG_IF(condition, ...) \
69 PRECICE_DEBUG(__VA_ARGS__); \
78#if defined(NDEBUG) && !defined(PRECICE_RELEASE_WITH_TRACE_LOG)
79#define PRECICE_NO_TRACE_LOG
82#ifdef PRECICE_NO_TRACE_LOG
86#define PRECICE_TRACE(...) \
87 ::precice::utils::ignore(__VA_ARGS__)
95#define PRECICE_TRACE(...) \
96 precice::logging::Tracer _tracer_(_log, PRECICE_LOG_LOCATION); \
97 _log.trace(PRECICE_LOG_LOCATION, std::string{"Entering "} + __func__ + PRECICE_LOG_ARGUMENTS(__VA_ARGS__))