MOTION
0.01
Framework for mixed-protocol multi-party computation
|
Go to the documentation of this file.
28 #include <boost/log/sinks/sync_frontend.hpp>
29 #include <boost/log/sinks/text_file_backend.hpp>
30 #include <boost/log/sources/severity_channel_logger.hpp>
31 #include <boost/log/trivial.hpp>
38 boost::log::sources::severity_channel_logger<boost::log::trivial::severity_level, std::size_t>;
44 Logger(std::size_t my_id, boost::log::trivial::severity_level severity_level);
48 void Log(boost::log::trivial::severity_level severity_level,
const std::string& message);
50 void Log(boost::log::trivial::severity_level severity_level, std::string&& message);
52 void LogTrace(
const std::string& message);
54 void LogTrace(std::string&& message);
56 void LogInfo(
const std::string& message);
58 void LogInfo(std::string&& message);
60 void LogDebug(
const std::string& message);
62 void LogDebug(std::string&& message);
64 void LogError(
const std::string& message);
66 void LogError(std::string&& message);
73 boost::shared_ptr<boost::log::sinks::synchronous_sink<boost::log::sinks::text_file_backend>>
75 std::unique_ptr<LoggerType> logger_;
76 const std::size_t my_id_;
77 std::atomic<bool> logging_enabled_ =
true;
78 std::mutex write_mutex_;
81 static std::mutex boost_log_core_mutex_;
void LogTrace(const std::string &message)
Definition: logger.cpp:110
void LogInfo(const std::string &message)
Definition: logger.cpp:128
void LogError(const std::string &message)
Definition: logger.cpp:160
void Log(boost::log::trivial::severity_level severity_level, const std::string &message)
void LogDebug(const std::string &message)
Definition: logger.cpp:142
~Logger()
Definition: logger.cpp:90
Definition: algorithm_description.cpp:35
bool IsEnabled()
Definition: logger.h:68
std::shared_ptr< Logger > LoggerPointer
Definition: backend.h:78
boost::log::sources::severity_channel_logger< boost::log::trivial::severity_level, std::size_t > LoggerType
Definition: logger.h:38
constexpr bool kVerboseDebug
Definition: constants.h:50
void SetEnabled(bool enable=true)
Definition: logger.cpp:174
constexpr bool kDebug
Definition: config.h:36
constexpr std::size_t kMb
Definition: constants.h:40