Odil
A C++11 library for the DICOM standard
logging.h
Go to the documentation of this file.
1 /*************************************************************************
2  * odil - Copyright (C) Universite de Strasbourg
3  * Distributed under the terms of the CeCILL-B license, as published by
4  * the CEA-CNRS-INRIA. Refer to the LICENSE file or to
5  * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
6  * for details.
7  ************************************************************************/
8 
9 #ifndef _5382f5e0_e993_4966_9447_542844edb635
10 #define _5382f5e0_e993_4966_9447_542844edb635
11 
12 #include <boost/preprocessor/facilities/overload.hpp>
13 #include <log4cpp/Category.hh>
14 #include <log4cpp/Priority.hh>
15 
16 #define ODIL_LOG_1(level) \
17  log4cpp::Category::getInstance("odil") << log4cpp::Priority::level
18 
19 #define ODIL_LOG_2(level, sub) \
20  log4cpp::Category::getInstance("odil." #sub) << log4cpp::Priority::level
21 
22 #if !BOOST_PP_VARIADICS_MSVC
23 
24 #define ODIL_LOG(...) BOOST_PP_OVERLOAD(ODIL_LOG_,__VA_ARGS__)(__VA_ARGS__)
25 
26 #else
27 
28 
29 #define ODIL_LOG(...) \
30  BOOST_PP_CAT(BOOST_PP_OVERLOAD(ODIL_LOG_,__VA_ARGS__)(__VA_ARGS__),BOOST_PP_EMPTY())
31 
32 #endif
33 
34 #endif // _5382f5e0_e993_4966_9447_542844edb635