Log.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) 2020 Fraunhofer Institute for Applied Information Technology (FIT)
3 // Network Research Group (NET)
4 // Schloss Birlinghoven, 53754 Sankt Augustin, GERMANY
5 // Contact: support@wiback.org
6 //
7 // This file is part of the SENF code tree.
8 // It is licensed under the 3-clause BSD License (aka New BSD License).
9 // See LICENSE.txt in the top level directory for details or visit
10 // https://opensource.org/licenses/BSD-3-Clause
11 //
12 
13 
17 #ifndef HH_SENF_Utils_Logger_Log_
18 #define HH_SENF_Utils_Logger_Log_ 1
19 
20 // Custom includes
21 #include <boost/preprocessor/seq/size.hpp>
22 #include <boost/preprocessor/dec.hpp>
23 #include <boost/preprocessor/seq/elem.hpp>
24 #include <boost/preprocessor/seq/pop_back.hpp>
25 #include "AreaRegistry.hh"
26 #include "Definitions.hh"
27 #include "Parameters.hh"
28 #include "StreamRegistry.hh"
29 
30 //#include "Log.mpp"
31 #include "Log.ih"
32 //-/////////////////////////////////////////////////////////////////////////////////////////////////
33 
89 //\{
91 
93 //\{
94 
106 #define SENF_LOG(args) \
107  SENF_LOG_BLOCK_( SENF_LOG_MERGE_PARAMETERS(BOOST_PP_SEQ_POP_BACK(args)), \
108  { log << BOOST_PP_SEQ_ELEM(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(args)),args); })
109 
116 #define SENF_LOG_TPL(args) \
117  SENF_LOG_BLOCK_TPL_( SENF_LOG_MERGE_PARAMETERS_TPL(BOOST_PP_SEQ_POP_BACK(args)), \
118  { log << BOOST_PP_SEQ_ELEM(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(args)),args); })
119 
133 #define SENF_LOG_BLOCK(args) \
134  SENF_LOG_BLOCK_( SENF_LOG_MERGE_PARAMETERS(BOOST_PP_SEQ_POP_BACK(args)), \
135  BOOST_PP_SEQ_ELEM(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(args)),args))
136 
143 #define SENF_LOG_BLOCK_TPL(args) \
144  SENF_LOG_BLOCK_TPL_( SENF_LOG_MERGE_PARAMETERS_TPL(BOOST_PP_SEQ_POP_BACK(args)), \
145  BOOST_PP_SEQ_ELEM(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(args)),args))
146 
147 //\}
148 //\}
149 
150 //-/////////////////////////////////////////////////////////////////////////////////////////////////
151 //#include "Log.cci"
152 //#include "Log.ct"
153 //#include "Log.cti"
154 #endif
155 
156 
157 // Local Variables:
158 // mode: c++
159 // fill-column: 100
160 // comment-column: 40
161 // c-file-style: "senf"
162 // indent-tabs-mode: nil
163 // ispell-local-dictionary: "american"
164 // compile-command: "scons -u test"
165 // End:
Parameters public header.
StreamRegistry public header.
Definitions public header.
AreaRegistry public header.