moving NeonServ into background by default; added a few startup parameters
[NeonServV5.git] / src / mysqlConn.c
index 3e5dd19dfac03a156ede2bb49a30bfb26f83b5a7..529e8a4347f6ca26a824c4a551be937c2e68ac11 100644 (file)
@@ -204,7 +204,7 @@ void free_mysql() {
 void show_mysql_error() {
     MYSQL *mysql_conn = get_mysql_conn();
     //show mysql_error()
-    printf("MySQL Error: %s\n", mysql_error(mysql_conn));
+    putlog(LOGLEVEL_ERROR, "MySQL Error: %s\n", mysql_error(mysql_conn));
 }
 
 void printf_mysql_query(const char *text, ...) {
@@ -218,7 +218,7 @@ void printf_mysql_query(const char *text, ...) {
     va_end(arg_list);
     if (pos < 0 || pos > (MYSQLMAXLEN - 2)) pos = MYSQLMAXLEN - 2;
     queryBuf[pos] = '\0';
-    printf("MySQL: %s\n", queryBuf);
+    putlog(LOGLEVEL_MYSQL, "MySQL: %s\n", queryBuf);
     if(mysql_query(mysql_conn, queryBuf)) {
         check_mysql();
         if(mysql_query(mysql_conn, queryBuf)) {
@@ -238,7 +238,7 @@ void printf_long_mysql_query(int len, const char *text, ...) {
     va_end(arg_list);
     if (pos < 0 || pos > (len - 2)) pos = len - 2;
     queryBuf[pos] = '\0';
-    printf("MySQL: %s\n", queryBuf);
+    putlog(LOGLEVEL_MYSQL, "MySQL: %s\n", queryBuf);
     if(mysql_query(mysql_conn, queryBuf)) {
         check_mysql();
         if(mysql_query(mysql_conn, queryBuf)) {