aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-08-10 21:53:02 +0200
committerChristian Grothoff <christian@grothoff.org>2018-08-10 21:53:02 +0200
commit32096a26ea635d7f8d757319945245cd06d262c4 (patch)
treeec9ee666dd250072b4ac259e835236d4f51e4e25
parent7328db7a405e5be7dbbee505f4e7ea8af7889c9a (diff)
downloadgnunet-32096a26ea635d7f8d757319945245cd06d262c4.tar.gz
gnunet-32096a26ea635d7f8d757319945245cd06d262c4.zip
nicer pq logging
-rw-r--r--src/pq/pq.c6
-rw-r--r--src/pq/pq_eval.c2
-rw-r--r--src/pq/pq_exec.c6
3 files changed, 11 insertions, 3 deletions
diff --git a/src/pq/pq.c b/src/pq/pq.c
index 66f9d983b..ae12f461e 100644
--- a/src/pq/pq.c
+++ b/src/pq/pq.c
@@ -11,7 +11,7 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/ 17*/
@@ -43,6 +43,10 @@ GNUNET_PQ_exec_prepared (PGconn *db_conn,
43 unsigned int len; 43 unsigned int len;
44 unsigned int i; 44 unsigned int i;
45 45
46 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
47 "Running prepared statement `%s' on %p\n",
48 name,
49 db_conn);
46 /* count the number of parameters */ 50 /* count the number of parameters */
47 len = 0; 51 len = 0;
48 for (i=0;0 != params[i].num_params;i++) 52 for (i=0;0 != params[i].num_params;i++)
diff --git a/src/pq/pq_eval.c b/src/pq/pq_eval.c
index 5abb1cd9c..586de6fea 100644
--- a/src/pq/pq_eval.c
+++ b/src/pq/pq_eval.c
@@ -11,7 +11,7 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/ 17*/
diff --git a/src/pq/pq_exec.c b/src/pq/pq_exec.c
index 31dbc3ff7..f089d7c0a 100644
--- a/src/pq/pq_exec.c
+++ b/src/pq/pq_exec.c
@@ -11,7 +11,7 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/ 17*/
@@ -79,6 +79,10 @@ GNUNET_PQ_exec_statements (PGconn *connection,
79 { 79 {
80 PGresult *result; 80 PGresult *result;
81 81
82 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
83 "Running statement `%s' on %p\n",
84 es[i].sql,
85 connection);
82 result = PQexec (connection, 86 result = PQexec (connection,
83 es[i].sql); 87 es[i].sql);
84 if ( (GNUNET_NO == es[i].ignore_errors) && 88 if ( (GNUNET_NO == es[i].ignore_errors) &&