From 24df44f57119e78db475f77b66c2e0ab6c8660d4 Mon Sep 17 00:00:00 2001 From: chatlanin Date: Thu, 18 Jul 2024 12:15:40 +0300 Subject: [PATCH] add service name to log --- src/trs/trs.hpp | 2 +- src/trs/utils/define.hpp | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/trs/trs.hpp b/src/trs/trs.hpp index 2173be2..e3c6d33 100644 --- a/src/trs/trs.hpp +++ b/src/trs/trs.hpp @@ -58,7 +58,7 @@ namespace trs { 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); } catch(std::exception& e) diff --git a/src/trs/utils/define.hpp b/src/trs/utils/define.hpp index 7a0eede..8d3744a 100644 --- a/src/trs/utils/define.hpp +++ b/src/trs/utils/define.hpp @@ -6,7 +6,3 @@ #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 DEF_LINE() std::experimental::source_location::current().line() -#define DEF_LOCATION() std::experimental::source_location::current() - -