vendor_global.h 850 B

1234567891011121314151617181920212223242526
  1. #ifndef __VENDOR_GLOBAL_H__
  2. #define __VENDOR_GLOBAL_H__
  3. #include <utils/logger.h>
  4. #include <utils/macro.h>
  5. #define VENDOR_MAX_PATH_SIZE 256
  6. #define VENDOR_RUN_PATH_ENV "DAS_CONFIG_DIR"
  7. static inline std::string vendor_env_dir()
  8. {
  9. ASSERT(getenv(VENDOR_RUN_PATH_ENV) != nullptr);
  10. return std::string(getenv(VENDOR_RUN_PATH_ENV));
  11. }
  12. const int32_t VENDOR_LOG_STORE_DAYS = 60; // log存储60天
  13. const std::string VENDOR_CONFIG_PATH = vendor_env_dir() + "/config";
  14. const std::string VENDOR_LOG_PATH = vendor_env_dir() + "/log";
  15. const std::string VENDOR_BIN_PATH = vendor_env_dir() + "/bin";
  16. const std::string VENDOR_DB_PATH = vendor_env_dir() + "/data";
  17. const std::string VENDOR_WWW_PATH = vendor_env_dir() + "/www";
  18. const std::string VENDOR_TEST_PATH = vendor_env_dir() + "/testfiles";
  19. #include "vendor/vendor_base.h"
  20. #endif // __VENDOR_GLOBAL_H__