00001 #ifndef BT_MINITRACE_LOGGER_H 00002 #define BT_MINITRACE_LOGGER_H 00003 00004 #include <cstring> 00005 #include "abstract_logger.h" 00006 00007 namespace BT 00008 { 00009 class MinitraceLogger : public StatusChangeLogger 00010 { 00011 static std::atomic<bool> ref_count; 00012 00013 public: 00014 MinitraceLogger(TreeNode* root_node, const char* filename_json); 00015 00016 virtual ~MinitraceLogger() override; 00017 00018 virtual void callback(Duration timestamp, const TreeNode& node, NodeStatus prev_status, 00019 NodeStatus status) override; 00020 00021 virtual void flush() override; 00022 00023 private: 00024 TimePoint prev_time_; 00025 }; 00026 00027 } // end namespace 00028 00029 #endif // BT_MINITRACE_LOGGER_H