diff options
Diffstat (limited to 'src/sql.c')
-rw-r--r-- | src/sql.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -60,7 +60,7 @@ sql_init_dictionary(struct dictionary *dict) struct sqlconn *conn = sql_find_connection(dict->parmv[0]); if (!conn) { - logmsg(LOG_EMERG, + wy_log(LOG_EMERG, _("INTERNAL ERROR: cannot find SQL connection %s"), dict->parmv[0]); abort(); @@ -83,7 +83,7 @@ sql_init_dictionary(struct dictionary *dict) conn->password, conn->database, conn->port, conn->socket, CLIENT_MULTI_RESULTS)) { - logmsg(LOG_ERR, + wy_log(LOG_ERR, _("failed to connect to database %s: " "error: %s\n"), dict->parmv[0], mysql_error(&conn->mysql)); @@ -134,30 +134,30 @@ sql_lookup_dictionary(struct dictionary *dict, void *handle, const char *query) MYSQL *mysql = &conn->mysql; if (!query) { - logmsg(LOG_ERR, _("no query supplied for dictionary %s"), + wy_log(LOG_ERR, _("no query supplied for dictionary %s"), "sql"); return 1; } if (mysql_query(mysql, query)) { - logmsg(LOG_ERR, _("query failed: %s"), mysql_error(mysql)); - logmsg(LOG_NOTICE, _("the failed query was: %s"), query); + wy_log(LOG_ERR, _("query failed: %s"), mysql_error(mysql)); + wy_log(LOG_NOTICE, _("the failed query was: %s"), query); return 1; } conn->result = mysql_store_result(mysql); if (!conn->result) { - logmsg(LOG_ERR, _("cannot get result: %s"), mysql_error(mysql)); - logmsg(LOG_NOTICE, _("the failed query was: %s"), query); + wy_log(LOG_ERR, _("cannot get result: %s"), mysql_error(mysql)); + wy_log(LOG_NOTICE, _("the failed query was: %s"), query); return 1; } dict->nrow = mysql_num_rows(conn->result); dict->ncol = mysql_num_fields(conn->result); if (wy_debug_level > 1) { - logmsg(LOG_DEBUG, _("query returned %u columns in %u rows"), + wy_log(LOG_DEBUG, _("query returned %u columns in %u rows"), dict->ncol, dict->nrow); - logmsg(LOG_DEBUG, _("the query was: %s"), query); + wy_log(LOG_DEBUG, _("the query was: %s"), query); } return 0; |