generated from Sithas/conan_template
Compare commits
2 Commits
master
...
5fcad355d1
| Author | SHA1 | Date | |
|---|---|---|---|
| 5fcad355d1 | |||
| e5fa38f25c |
+4
-4
@@ -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
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user