From c040322d966df5cf35839056ce694b1a2dfc3e02 Mon Sep 17 00:00:00 2001 From: chatlanin Date: Wed, 10 Jul 2024 13:04:54 +0300 Subject: [PATCH] add service name --- src/trs/trs.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/trs/trs.hpp b/src/trs/trs.hpp index 166c55f..76fb9fb 100644 --- a/src/trs/trs.hpp +++ b/src/trs/trs.hpp @@ -26,7 +26,7 @@ namespace trs ~http() = default; public: - void init(std::string app_connection, std::string log_connection) + void init(std::string service_name, std::string app_connection, std::string log_connection) { set_read_timeout(5, 0); set_write_timeout(5, 0); @@ -35,6 +35,7 @@ namespace trs set_CORS(); set_post(); database::instance().set_connection(app_connection, log_connection); + m_service_name = service_name; } template @@ -62,6 +63,7 @@ namespace trs } private: + std::string m_service_name; function_manager m_function_manager; inspector m_inspector; @@ -97,6 +99,7 @@ namespace trs catch(hack::exception& ex) { ex.transaction(tr); + ex.service(m_service_name); ex.log(); ex.commit(); }