add Model::get_logger()

This commit is contained in:
2022-08-01 03:58:07 +02:00
parent 8373f9e9d8
commit c54a5bed05
2 changed files with 15 additions and 6 deletions

View File

@@ -1163,16 +1163,24 @@ void Model::log_table_name_with_field(const wchar_t * db_field_name, bool put_sc
}
void Model::put_to_log(const wchar_t * str)
pt::Log * Model::get_logger()
{
if( model_connector )
{
pt::Log * log = model_connector->get_logger();
return model_connector->get_logger();
}
if( log )
{
(*log) << str << pt::Log::logend;
}
return nullptr;
}
void Model::put_to_log(const wchar_t * str)
{
pt::Log * log = get_logger();
if( log )
{
(*log) << str << pt::Log::logend;
}
}