2 Commits

Author SHA1 Message Date
Антон 5fcad355d1 Подготовка интеграционного теста 2025-10-07 07:50:15 +03:00
Антон e5fa38f25c Подготовка интеграционного теста 2025-10-07 06:49:04 +03:00
2 changed files with 8 additions and 8 deletions
+4 -4
View File
@@ -11,11 +11,11 @@ namespace uad
void InitLogs()
{
logging::add_file_log(
logging::keywords::file_name = "app_%Y-%m-%d_%H-%M-%S.log", // Имя файла с timestamp
logging::keywords::rotation_size = 10 * 1024 * 1024, // Ротация при достижении 10 МБ
logging::keywords::file_name = "app_%Y-%m-%d_%H-%M-%S.log",
logging::keywords::rotation_size = 10 * 1024 * 1024,
logging::keywords::time_based_rotation =
logging::sinks::file::rotation_at_time_point(0, 0, 0), // Ротация каждый день в полночь
logging::keywords::format = "[%TimeStamp%] [%Severity%]: %Message%" // Формат записи
logging::sinks::file::rotation_at_time_point(0, 0, 0),
logging::keywords::format = "[%TimeStamp%] [%Severity%]: %Message%"
);
}
}
+4 -4
View File
@@ -2,6 +2,9 @@
#include <sdkddkver.h>
#endif
#include <boost/log/trivial.hpp>
#include <boost/log/utility/setup/file.hpp>
#include <boost/log/utility/setup/common_attributes.hpp>
#include <algorithm>
#include <boost/asio/signal_set.hpp>
#include <boost/beast/core.hpp>
@@ -14,9 +17,6 @@
#include <string>
#include <thread>
#include <vector>
#include <boost/log/trivial.hpp>
#include <boost/log/utility/setup/file.hpp>
#include <boost/log/utility/setup/common_attributes.hpp>
#include "./session/WebsocketSession.h"
#include "./listener/Listener.h"
@@ -63,7 +63,7 @@ int main(int argc, char* argv[])
net::signal_set signals(ioc, SIGINT, SIGTERM);
signals.async_wait([&](beast::error_code const&, int) { ioc.stop(); });
BOOST_LOG_TRIVIAL(error) << "Приложение запущено";
BOOST_LOG_TRIVIAL(info) << "Приложение запущено";
std::vector<std::thread> v;
v.reserve(threads - 1);