From b2cb8bcbb9495b3c13741661624145700374b33e Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Thu, 9 Feb 2012 16:53:15 -0500 Subject: Log INFO messages in port driver for queries. --- c_src/mysqlerl.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'c_src/mysqlerl.c') 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}}", -- cgit v1.2.3