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(); }