main.cpp 790 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #include <iostream>
  2. #include "spdlog/spdlog.h"
  3. #include "SPAServer.h"
  4. #include "LHLogInit.h"
  5. #include "LHQLogAPI.h"
  6. #include "ThreadPool.h"
  7. #include <QCoreApplication>
  8. #include <QString>
  9. #include "RingQueue.hpp"
  10. RingQueue<QString> g_queue(10);
  11. int main(int argc, char* argv[])
  12. {
  13. QCoreApplication app(argc, argv);
  14. /* 初始化日志库 */
  15. initLog("SecurePlayAuxServer", g_apiLhQLog);
  16. auto logger = spdlog::get("main");
  17. if(logger == nullptr)
  18. {
  19. SPDLOG_ERROR("main logger is nullptr");
  20. return -1;
  21. }
  22. SPDLOG_LOGGER_INFO(logger, "★ ★ ★ ★ ★ ☆ SecurePlayAuxServer ☆ ★ ★ ★ ★ ★");
  23. /* 设置线程池最大线程个数 */
  24. CPPTP.setThreadMaxNum(256);
  25. SPAServer server;
  26. return app.exec();
  27. }