Utils/Logger: BUGFIX: add SENF_LOG_TPL variants which work with templatized log param...
[senf.git] / Utils / Logger / Log.hh
index efb5143..072e893 100644 (file)
     SENF_LOG_BLOCK_( SENF_LOG_MERGE_PARAMETERS(BOOST_PP_SEQ_POP_BACK(args)),                      \
                      { log << BOOST_PP_SEQ_ELEM(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(args)),args); })
 
+#define SENF_LOG_TPL(args)                                                                        \
+    SENF_LOG_BLOCK_( SENF_LOG_MERGE_PARAMETERS_TPL(BOOST_PP_SEQ_POP_BACK(args)),                  \
+                     { log << BOOST_PP_SEQ_ELEM(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(args)),args); })
+
 /** \brief Enable block based on logging parameters
 
     This macro is like SENF_LOG, however instead of writing a simple message, this macro allows
     SENF_LOG_BLOCK_( SENF_LOG_MERGE_PARAMETERS(BOOST_PP_SEQ_POP_BACK(args)),                      \
                      BOOST_PP_SEQ_ELEM(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(args)),args))
 
+#define SENF_LOG_BLOCK_TPL(args)                                                                  \
+    SENF_LOG_BLOCK_( SENF_LOG_MERGE_PARAMETERS_TPL(BOOST_PP_SEQ_POP_BACK(args)),                  \
+                     BOOST_PP_SEQ_ELEM(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(args)),args))
+
 #define SENF_LOG_BLOCK_(parameters, block)                                                        \
     do {                                                                                          \
         if (parameters::compile_enabled && parameters::enabled()) {                               \