[fix] fix all unused variables and type conversions

This commit is contained in:
dijunkun
2024-11-26 23:30:38 +08:00
parent 7e3856a68d
commit 826fc2d312
39 changed files with 4126 additions and 5696 deletions

View File

@@ -6,12 +6,20 @@ std::shared_ptr<spdlog::logger> get_logger() {
}
auto now = std::chrono::system_clock::now() + std::chrono::hours(8);
auto timet = std::chrono::system_clock::to_time_t(now);
auto localTime = *std::gmtime(&timet);
auto now_time = std::chrono::system_clock::to_time_t(now);
std::tm tm_info;
#ifdef _WIN32
gmtime_s(&tm_info, &now_time);
#else
std::gmtime_r(&now_time, &tm_info);
#endif
std::stringstream ss;
std::string filename;
ss << LOGGER_NAME;
ss << std::put_time(&localTime, "-%Y%m%d-%H%M%S.log");
ss << std::put_time(&tm_info, "-%Y%m%d-%H%M%S.log");
ss >> filename;
std::string path = "logs/" + filename;