From 7aab81aa2d0c64e7b04360456915168849582d59 Mon Sep 17 00:00:00 2001 From: avsdev-cw Date: Wed, 7 Oct 2020 15:46:31 +0100 Subject: [PATCH] Debug query colour switch --- src/db_query.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/db_query.c b/src/db_query.c index a26903a..ca12e13 100644 --- a/src/db_query.c +++ b/src/db_query.c @@ -10,11 +10,15 @@ #include "db_where-builder.h" #include "strext.h" +#ifndef SQL_DEBUG_COLOUR +# define SQL_DEBUG_COLOUR 36 +#endif + uint64_t simpleQuery(struct stored_conn_t *sconn, const char *qry, size_t qry_len) { #if defined DEBUG || defined SQL_DEBUG - printf("QRY: %s\n", qry); + printf("\x1b[%dm" "QRY: %s" "\x1b[0m" "\n", SQL_DEBUG_COLOUR, qry); #endif char *old_ptr;