used PT::Log::logsave in postgresqlconnector in some places
git-svn-id: svn://ttmath.org/publicrep/morm/trunk@1181 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
parent
48b04fb5de
commit
79f9522708
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2018, Tomasz Sowa
|
||||
* Copyright (c) 2018-2019, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -583,6 +583,7 @@ void PostgreSQLConnector::log_connection_socket()
|
|||
{
|
||||
(*log) << PT::Log::log2 << "Morm: connection to the database works fine" << PT::Log::logend;
|
||||
(*log) << PT::Log::log3 << "Morm: connection socket: " << PQsocket(pg_conn) << PT::Log::logend;
|
||||
(*log) << PT::Log::logsave;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -592,7 +593,7 @@ void PostgreSQLConnector::wait_for_connection()
|
|||
{
|
||||
if( log )
|
||||
{
|
||||
(*log) << PT::Log::log3 << "Morm: waiting for the db to be ready...." << PT::Log::logend;
|
||||
(*log) << PT::Log::log3 << "Morm: waiting for the db to be ready...." << PT::Log::logend << PT::Log::logsave;
|
||||
}
|
||||
|
||||
while( !assert_connection(false) )
|
||||
|
@ -623,7 +624,7 @@ bool was_connection = true;
|
|||
{
|
||||
if( put_log && log )
|
||||
{
|
||||
(*log) << PT::Log::log2 << "Morm: connection to the database is lost, trying to recover" << PT::Log::logend;
|
||||
(*log) << PT::Log::log2 << "Morm: connection to the database is lost, trying to recover" << PT::Log::logend << PT::Log::logsave;
|
||||
}
|
||||
|
||||
was_connection = false;
|
||||
|
@ -647,7 +648,7 @@ bool was_connection = true;
|
|||
{
|
||||
if( put_log && log )
|
||||
{
|
||||
(*log) << PT::Log::log1 << "Morm: connection to db server cannot be established" << PT::Log::logend;
|
||||
(*log) << PT::Log::log1 << "Morm: connection to db server cannot be established" << PT::Log::logend << PT::Log::logsave;
|
||||
}
|
||||
|
||||
// if( throw_if_no_connection )
|
||||
|
@ -668,7 +669,7 @@ void PostgreSQLConnector::set_db_parameters()
|
|||
{
|
||||
if( log )
|
||||
{
|
||||
(*log) << PT::Log::log1 << "Morm: Can't set the proper client encoding" << PT::Log::logend;
|
||||
(*log) << PT::Log::log1 << "Morm: Can't set the proper client encoding" << PT::Log::logend << PT::Log::logsave;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue