1 #ifndef OTSDAQ_MESSAGEFACILITY_ITRACECONTROLLER_H
2 #define OTSDAQ_MESSAGEFACILITY_ITRACECONTROLLER_H
8 #include <unordered_map>
21 typedef std::unordered_map<std::string, TraceMasks> TraceLevelMap;
22 typedef std::unordered_map<std::string, TraceLevelMap> HostTraceLevelMap;
27 virtual HostTraceLevelMap GetTraceLevels() = 0;
28 virtual void SetTraceLevelMask(std::string trace_name, TraceMasks
const& lvl, std::string host =
"localhost") = 0;
31 std::string GetHostnameString()
33 char hostname_c[HOST_NAME_MAX];
34 gethostname(hostname_c, HOST_NAME_MAX);
35 return std::string(hostname_c);
45 HostTraceLevelMap GetTraceLevels()
final {
return HostTraceLevelMap(); }
46 void SetTraceLevelMask(std::string,
TraceMasks const&, std::string)
final {}
51 #endif // OTSDAQ_MESSAGEFACILITY_ITRACECONTROLLER_H