aboutsummaryrefslogtreecommitdiffstats
path: root/c_src
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2012-02-09 16:53:15 -0500
committerBrian Cully <bjc@kublai.com>2012-02-09 16:53:15 -0500
commitb2cb8bcbb9495b3c13741661624145700374b33e (patch)
tree49f5e8154864c08750e31f9e8d32a721222f2447 /c_src
parent6d7cbc2e9c3b7257af72527b0f6237eb933989e9 (diff)
downloadmysqlerl-b2cb8bcbb9495b3c13741661624145700374b33e.tar.gz
mysqlerl-b2cb8bcbb9495b3c13741661624145700374b33e.zip
Log INFO messages in port driver for queries.
Diffstat (limited to 'c_src')
-rw-r--r--c_src/mysqlerl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/c_src/mysqlerl.c b/c_src/mysqlerl.c
index c5192dd..4be6be9 100644
--- a/c_src/mysqlerl.c
+++ b/c_src/mysqlerl.c
@@ -350,6 +350,8 @@ handle_query(ETERM *cmd)
q = erl_iolist_to_string(query);
erl_free_term(query);
+ logmsg("INFO: got query: %s", q);
+
handle = mysql_stmt_init(&dbh);
if (mysql_stmt_prepare(handle, q, strlen(q))) {
resp = erl_format("{error, {mysql_error, ~i, ~s}}",
@@ -433,6 +435,8 @@ handle_param_query(ETERM *msg)
q = erl_iolist_to_string(query);
erl_free_term(query);
+ logmsg("INFO: got param query: %s", q);
+
params = erl_element(3, msg);
erl_free_term(params);
@@ -616,6 +620,8 @@ handle_select_count(ETERM *msg)
q = erl_iolist_to_string(query);
erl_free_term(query);
+ logmsg("INFO: Got select count for: %s", q);
+
handle = mysql_stmt_init(&dbh);
if (mysql_stmt_prepare(handle, q, strlen(q))) {
resp = erl_format("{error, {mysql_error, ~i, ~s}}",