}
// Destroy connection
- VcoreLogD("Destroying thread database connection: %s", m_address.c_str());
+ LogDebug("Destroying thread database connection: " << m_address);
delete *Connection();
void TransactionUnref()
{
- VcoreLogD("Unref transaction");
+ LogDebug("Unref transaction");
if (--(*TransactionDepth()) == 0) {
- VcoreLogD("Transaction is finalized");
+ LogDebug("Transaction is finalized");
if (*TransactionCancel()) {
- VcoreLogD("Transaction will be rolled back");
+ LogDebug("Transaction will be rolled back");
(*Connection())->RollbackTransaction();
} else {
- VcoreLogD("Transaction will be commited");
+ LogDebug("Transaction will be commited");
(*Connection())->CommitTransaction();
}
}
}
// Initialize SQL connection described in traits
- VcoreLogD("Attaching thread database connection: %s", m_address.c_str());
+ LogDebug("Attaching thread database connection: " << m_address);
Connection() = new VcoreDPL::DB::SqlConnection(
m_address.c_str(), m_flags, options);
// It must not be in linger state yet
Assert(*Linger() == false);
- VcoreLogD("Detaching thread database connection: %s", m_address.c_str());
+ LogDebug("Detaching thread database connection: " << m_address);
// Enter linger state
*Linger() = true;
// Calling thread must support thread database connections
Assert(!Connection().IsNull());
- VcoreLogD("Begin transaction");
+ LogDebug("Begin transaction");
// Addref transaction
if (++(*TransactionDepth()) == 1) {
- VcoreLogD("Transaction is initialized");
+ LogDebug("Transaction is initialized");
TransactionCancel() = false;
(*Connection())->BeginTransaction();
// Calling thread must support thread database connections
Assert(!Connection().IsNull());
- VcoreLogD("Commit transaction");
+ LogDebug("Commit transaction");
// Unref transation
TransactionUnref();