You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
965 B

2 years ago
2 years ago
2 years ago
  1. #pragma once
  2. #include <fstream>
  3. #include <functional>
  4. #include <iostream>
  5. #include <list>
  6. #include <map>
  7. #include <memory>
  8. #include <set>
  9. #include <sstream>
  10. #include <string>
  11. #include <vector>
  12. #include "iflytop/core/basic/nlohmann/json.hpp"
  13. #include "iflytop/core/core.hpp"
  14. namespace iflytop {
  15. using namespace std;
  16. class DisinfectionLogger {
  17. ENABLE_LOGGER(DisinfectionLogger);
  18. ofstream m_logfile;
  19. public:
  20. DisinfectionLogger();
  21. ~DisinfectionLogger();
  22. void initialize(string log_file_name);
  23. void write(string log);
  24. };
  25. class DisinfectionLogsManager {
  26. ENABLE_LOGGER(DisinfectionLogsManager);
  27. public:
  28. DisinfectionLogsManager(/* args */);
  29. ~DisinfectionLogsManager();
  30. void initialize(){};
  31. shared_ptr<DisinfectionLogger> createNewLogger(string log_file_name);
  32. nlohmann::json getlogger(string log_file_name);
  33. nlohmann::json getLoggerList();
  34. private:
  35. void list_dir_csvfile(string path, vector<string>& sv);
  36. };
  37. } // namespace iflytop