OSDN Git Service

nodebug mode fix.
authorvisor <visor@users.sourceforge.jp>
Thu, 17 Jan 2013 13:57:01 +0000 (22:57 +0900)
committervisor <visor@users.sourceforge.jp>
Thu, 17 Jan 2013 13:57:01 +0000 (22:57 +0900)
ext/ml-sqlite3.cc

index f285d7b..e8e3b89 100644 (file)
@@ -72,7 +72,7 @@ int  MLSqlite3::prepare (const ustring& sql) {
     int  rc;
 
 #ifdef DEBUG
-    if (mlenv->log) {
+    if (mlenv->log && ! mlenv->mlPool->nolog) {
        *mlenv->log << "\t" << sql << "\n";
     }
 #endif /* DEBUG */
@@ -91,7 +91,7 @@ void  MLSqlite3::bind (namearray& name, namearray& value) {
         i1 != name.end ();
         i1 ++, i2 ++) {
 #ifdef DEBUG
-       if (mlenv->log) {
+       if (mlenv->log && ! mlenv->mlPool->nolog) {
            *mlenv->log << "\tbind ";
            if (*i1)
                *mlenv->log << *(*i1);
@@ -126,7 +126,7 @@ void  MLSqlite3::bind (namearray& value) {
 
     for (n = 1, i2 = value.begin (); i2 != value.end (); n ++, i2 ++) {
 #ifdef DEBUG
-       if (mlenv->log) {
+       if (mlenv->log && ! mlenv->mlPool->nolog) {
            *mlenv->log << "\tbind[" << n << "] <= \"";
            if (*i2)
                *mlenv->log << ellipsis (logText (*(*i2)), cLOGSHORTSIZE);