Log.h
Go to the documentation of this file.
1 /********************************************************************
2 *
3 * Project Artec 3D Scanning SDK
4 *
5 * Purpose: log code
6 *
7 * Copyright: Artec Group
8 *
9 ********************************************************************/
10 
11 #ifndef _AALGORITHMSDK_LOG_H_
12 #define _AALGORITHMSDK_LOG_H_
13 
14 #ifndef AALGORITHMSDK_DISABLE_TRACING
15 #include <artec/sdk/base/Log.h>
16 
17 namespace artec { namespace sdk { namespace algorithms
18 {
19 
20 #define AALGORITHMSDK_MESSAGE(severity, ...) { if (artec::sdk::base::getOutputLevel() >= severity) artec::sdk::base::report(severity, L"AALGORITHM", __VA_ARGS__); }
21 #define AALGORITHMSDK_INFO(...) AALGORITHMSDK_MESSAGE(artec::sdk::base::VerboseLevel_Info, __VA_ARGS__)
22 #define AALGORITHMSDK_ERROR(...) AALGORITHMSDK_MESSAGE(artec::sdk::base::VerboseLevel_Error, __VA_ARGS__)
23 #define AALGORITHMSDK_WARNING(...) AALGORITHMSDK_MESSAGE(artec::sdk::base::VerboseLevel_Warning, __VA_ARGS__)
24 #define AALGORITHMSDK_TRACE(...) AALGORITHMSDK_MESSAGE(artec::sdk::base::VerboseLevel_Trace, __VA_ARGS__)
25 
26 } } } // namespace artec::sdk::algorithms
27 
28 #else
29 
30 #define AALGORITHMSDK_MESSAGE(severity, ...) {}
31 #define AALGORITHMSDK_INFO(...) {}
32 #define AALGORITHMSDK_ERROR(...) {}
33 #define AALGORITHMSDK_WARNING(...) {}
34 #define AALGORITHMSDK_TRACE(...) {}
35 
36 #endif
37 
38 #endif // _AALGORITHMSDK_LOG_H_