From cdf53d0e27a2be4f357a5142f7d5d320c759cbc9 Mon Sep 17 00:00:00 2001 From: Felix Schindler <felix.schindler@wwu.de> Date: Mon, 3 Aug 2020 22:36:54 +0200 Subject: [PATCH] [common.timedlogging] add LOG__ macro --- dune/xt/common/timedlogging.hh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dune/xt/common/timedlogging.hh b/dune/xt/common/timedlogging.hh index 493cb23f6..bfcec7cf1 100644 --- a/dune/xt/common/timedlogging.hh +++ b/dune/xt/common/timedlogging.hh @@ -102,13 +102,21 @@ public: #ifdef LOG_ -# error Macro LOG_ already defined, open an issue at https://github.com/dune-community/dune-xt-common/issues/new ! +# error Macro LOG_ already defined, open an issue at https://zivgitlab.uni-muenster.de/ag-ohlberger/dune-community/dune-xt/-/issues ! #else # define LOG_(type) \ if (this->logger.type##_enabled) \ this->logger.type() #endif +#ifdef LOG__ +# error Macro LOG_ already defined, open an issue at https://zivgitlab.uni-muenster.de/ag-ohlberger/dune-community/dune-xt/-/issues ! +#else +# define LOG__(base, type) \ + if (base ::logger.type##_enabled) \ + base ::logger.type() +#endif + template <typename T = void> class WithLogger -- GitLab