diff Framework/PostgreSQL/PostgreSQLDatabase.cpp @ 429:dbf811b1bb43 pg-transactions

new configuration 'EnableVerboseLogs' to log SQL statements being executed
author Alain Mazy <am@osimis.io>
date Thu, 30 Nov 2023 14:47:23 +0100
parents a7f0f27fe33c
children f0976163dbe1
line wrap: on
line diff
--- a/Framework/PostgreSQL/PostgreSQLDatabase.cpp	Thu Nov 30 14:46:38 2023 +0100
+++ b/Framework/PostgreSQL/PostgreSQLDatabase.cpp	Thu Nov 30 14:47:23 2023 +0100
@@ -159,7 +159,10 @@
 
   void PostgreSQLDatabase::ExecuteMultiLines(const std::string& sql)
   {
-    LOG(TRACE) << "PostgreSQL: " << sql;
+    if (IsVerboseEnabled())
+    {
+      LOG(INFO) << "PostgreSQL: " << sql;
+    }
     Open();
 
     PGresult* result = PQexec(reinterpret_cast<PGconn*>(pg_), sql.c_str());