add log to console bool
This commit is contained in:
parent
8c1f7e7cbc
commit
edd4b897ce
@ -38,6 +38,8 @@ namespace trs
|
||||
m_service_name = service_name;
|
||||
}
|
||||
|
||||
void log_to_console(bool v) { m_log_to_console = v; }
|
||||
|
||||
template<typename Function>
|
||||
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<transaction> m_function_manager;
|
||||
inspector<transaction> m_inspector;
|
||||
|
||||
@ -100,6 +103,7 @@ namespace trs
|
||||
{
|
||||
ex.transaction(tr);
|
||||
ex.service(m_service_name);
|
||||
if (m_log_to_console)
|
||||
ex.log();
|
||||
ex.commit<database>();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user