diff --git a/src/trs/trs.hpp b/src/trs/trs.hpp index 76fb9fb..080e883 100644 --- a/src/trs/trs.hpp +++ b/src/trs/trs.hpp @@ -38,6 +38,8 @@ namespace trs m_service_name = service_name; } + void log_to_console(bool v) { m_log_to_console = v; } + template void registration(std::string func_name, Function insp, Function func) { @@ -64,6 +66,7 @@ namespace trs private: std::string m_service_name; + bool m_log_to_console = true; function_manager m_function_manager; inspector m_inspector; @@ -100,7 +103,8 @@ namespace trs { ex.transaction(tr); ex.service(m_service_name); - ex.log(); + if (m_log_to_console) + ex.log(); ex.commit(); }