add service name to log

This commit is contained in:
chatlanin 2024-07-18 12:15:40 +03:00
parent 2f9cef0fa9
commit 24df44f571
2 changed files with 1 additions and 5 deletions

View File

@ -58,7 +58,7 @@ namespace trs
{ {
try try
{ {
hack::log(" ")("server listen:", var::HOST, var::PORT); hack::log(" ")(std::format("[{}]", m_service_name), "listen:", var::HOST, var::PORT);
listen(var::HOST, var::PORT); listen(var::HOST, var::PORT);
} }
catch(std::exception& e) catch(std::exception& e)

View File

@ -6,7 +6,3 @@
#define TRS_LOG(...) if (trs::var::status::DEBUG) hack::log(": ")(__VA_ARGS__) #define TRS_LOG(...) if (trs::var::status::DEBUG) hack::log(": ")(__VA_ARGS__)
#define TRS_ERROR(...) if (trs::var::status::DEBUG) hack::error(": ")(__VA_ARGS__) #define TRS_ERROR(...) if (trs::var::status::DEBUG) hack::error(": ")(__VA_ARGS__)
#define DEF_LINE() std::experimental::source_location::current().line()
#define DEF_LOCATION() std::experimental::source_location::current()