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.

43 lines
1005 B

4 months ago
  1. //
  2. // Created by zhaohe on 19-6-18.
  3. //
  4. #pragma once
  5. #include <fstream>
  6. #include <iostream>
  7. #include <list>
  8. #include <map>
  9. #include <memory>
  10. #include <set>
  11. #include <sstream>
  12. #include <string>
  13. #include <vector>
  14. #define SET_DEFAULT_SPD_LOG_CONFIG_FILE(fileName) \
  15. extern "C" { \
  16. const std::string spdLoggerConfig() { return #fileName; } \
  17. }
  18. extern "C" {
  19. /**
  20. * @brief
  21. * logger的默认配置文件列表如下
  22. * 1. spd_logger_cfg.json
  23. * 使
  24. * @Demo
  25. *
  26. * const string spdLoggerConfig(){
  27. * return "my_logger_cfg.json";
  28. * }
  29. *
  30. * @WARNING:
  31. *
  32. * static Logger_t logger=SpdLoggerFactory::createLogger(loggname);
  33. *
  34. * spdLoggerConfig方法返回值不能够动态设置使
  35. *
  36. * @return const string
  37. */
  38. const std::string __attribute__((weak)) spdLoggerConfig();
  39. }