Intel HEXL
Intel Homomorphic Encryption Acceleration Library, accelerating the modular arithmetic operations used in homomorphic encryption.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
logging.hpp
Go to the documentation of this file.
1 // Copyright (C) 2020-2021 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 
4 #pragma once
5 
6 #include <algorithm>
7 #include <vector>
8 
9 #include "hexl/util/defines.hpp"
10 
11 // Wrap HEXL_VLOG with HEXL_DEBUG; this ensures no logging overhead in
12 // release mode
13 #ifdef HEXL_DEBUG
14 
15 // TODO(fboemer) Enable if needed
16 // #define ELPP_THREAD_SAFE
17 #define ELPP_CUSTOM_COUT std::cerr
18 #define ELPP_STL_LOGGING
19 #define ELPP_LOG_STD_ARRAY
20 #define ELPP_LOG_UNORDERED_MAP
21 #define ELPP_LOG_UNORDERED_SET
22 #define ELPP_NO_LOG_TO_FILE
23 #define ELPP_DISABLE_DEFAULT_CRASH_HANDLING
24 #define ELPP_WINSOCK2
25 
26 #include <easylogging++.h>
27 
28 #define HEXL_VLOG(N, rest) \
29  do { \
30  if (VLOG_IS_ON(N)) { \
31  VLOG(N) << rest; \
32  } \
33  } while (0);
34 
35 #else
36 
37 #define HEXL_VLOG(N, rest) \
38  {}
39 
40 #define START_EASYLOGGINGPP(X, Y) \
41  {}
42 
43 #endif