diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-11 12:15:03 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-11 12:15:03 +0000 |
commit | d17465716790010b6e3221f9ce49272110276ccf (patch) | |
tree | d929b9c717e789d818d0eefbfe6e018974ae48f6 /src/modules/extra | |
parent | 312d49abb008dccf9871b663decaa1bacf18c20a (diff) |
Now two types of log macro, log() and ilog(). log() assumes an InspIRCd object called ServerInstance, ilog() takes an InspIRCd object as first param.
TODO: Run a regexp over these, using perl, to translate them into InspIRCd::Log calls and then eliminate the macro :)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4879 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/extra')
-rw-r--r-- | src/modules/extra/m_mysql.cpp | 41 | ||||
-rw-r--r-- | src/modules/extra/m_pgsql.cpp | 108 | ||||
-rw-r--r-- | src/modules/extra/m_sqllog.cpp | 16 | ||||
-rw-r--r-- | src/modules/extra/m_sqlv2.h | 2 |
4 files changed, 67 insertions, 100 deletions
diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp index b539f6327..d8a20535a 100644 --- a/src/modules/extra/m_mysql.cpp +++ b/src/modules/extra/m_mysql.cpp @@ -102,8 +102,6 @@ public: void push(const SQLrequest &q) { - log(DEBUG, "QueryQueue::push(): Adding %s query to queue: %s", ((q.pri) ? "priority" : "non-priority"), q.query.q.c_str()); - if(q.pri) priority.push_back(q); else @@ -216,7 +214,6 @@ class MySQLresult : public SQLresult { /* A number of affected rows from from mysql_affected_rows. */ - log(DEBUG,"Created new MySQLresult of non-error type"); fieldlists.clear(); rows = 0; if (affected_rows >= 1) @@ -249,7 +246,6 @@ class MySQLresult : public SQLresult SQLfield sqlf(b, !row[field_count]); colnames.push_back(a); fieldlists[n].push_back(sqlf); - log(DEBUG,"Inc field count to %d",field_count+1); field_count++; } n++; @@ -258,14 +254,12 @@ class MySQLresult : public SQLresult } mysql_free_result(res); } - log(DEBUG, "Created new MySQL result; %d rows, %d columns", rows, colnames.size()); } MySQLresult(Module* self, Module* to, SQLerror e, unsigned int id) : SQLresult(self, to, id), currentrow(0) { rows = 0; error = e; - log(DEBUG,"Created new MySQLresult of error type"); } ~MySQLresult() @@ -313,7 +307,6 @@ class MySQLresult : public SQLresult return fieldlists[row][column]; } - log(DEBUG,"Danger will robinson, we don't have row %d, column %d!", row, column); throw SQLbadColName(); /* XXX: We never actually get here because of the throw */ @@ -439,7 +432,6 @@ class SQLConnection : public classbase /* Parse the command string and dispatch it to mysql */ SQLrequest& req = queue.front(); - log(DEBUG,"DO QUERY: %s",req.query.q.c_str()); /* Pointer to the buffer we screw around with substitution in */ char* query; @@ -491,10 +483,7 @@ class SQLConnection : public classbase req.query.p.pop_front(); } else - { - log(DEBUG, "Found a substitution location but no parameter to substitute :|"); break; - } } else { @@ -506,14 +495,10 @@ class SQLConnection : public classbase *queryend = 0; - log(DEBUG, "Attempting to dispatch query: %s", query); - pthread_mutex_lock(&queue_mutex); req.query.q = query; pthread_mutex_unlock(&queue_mutex); - log(DEBUG,"REQUEST ID: %d",req.id); - if (!mysql_real_query(&connection, req.query.q.data(), req.query.q.length())) { /* Successfull query */ @@ -533,7 +518,6 @@ class SQLConnection : public classbase { /* XXX: See /usr/include/mysql/mysqld_error.h for a list of * possible error numbers and error messages */ - log(DEBUG,"SQL ERROR: %s",mysql_error(&connection)); SQLerror e(QREPLY_FAIL, ConvToStr(mysql_errno(&connection)) + std::string(": ") + mysql_error(&connection)); MySQLresult* r = new MySQLresult(SQLModule, req.GetSource(), e, req.id); r->dbid = this->GetID(); @@ -649,12 +633,7 @@ void NotifyMainThread(SQLConnection* connection_with_new_result) * block if we like. We just send the connection id of the * connection back. */ - log(DEBUG,"Notify of result on connection: %s",connection_with_new_result->GetID().c_str()); - if (send(QueueFD, connection_with_new_result->GetID().c_str(), connection_with_new_result->GetID().length()+1, 0) < 1) // add one for null terminator - { - log(DEBUG,"Error writing to QueueFD: %s",strerror(errno)); - } - log(DEBUG,"Sent it on its way via fd=%d",QueueFD); + send(QueueFD, connection_with_new_result->GetID().c_str(), connection_with_new_result->GetID().length()+1, 0); } void* DispatcherThread(void* arg); @@ -683,7 +662,7 @@ class Notifier : public InspSocket Notifier(InspIRCd* SI, int newfd, char* ip) : InspSocket(SI, newfd, ip) { - log(DEBUG,"Constructor of new socket"); + ilog(Instance,DEBUG,"Constructor of new socket"); } /* Using getsockname and ntohs, we can determine which port number we were allocated */ @@ -698,7 +677,7 @@ class Notifier : public InspSocket virtual int OnIncomingConnection(int newsock, char* ip) { - log(DEBUG,"Inbound connection on fd %d!",newsock); + ilog(Instance,DEBUG,"Inbound connection on fd %d!",newsock); Notifier* n = new Notifier(this->Instance, newsock, ip); this->Instance->AddSocket(n); return true; @@ -706,17 +685,17 @@ class Notifier : public InspSocket virtual bool OnDataReady() { - log(DEBUG,"Inbound data!"); + ilog(Instance,DEBUG,"Inbound data!"); char* data = this->Read(); ConnMap::iterator iter; if (data && *data) { - log(DEBUG,"Looking for connection %s",data); + ilog(Instance,DEBUG,"Looking for connection %s",data); /* We expect to be sent a null terminated string */ if((iter = Connections.find(data)) != Connections.end()) { - log(DEBUG,"Found it!"); + ilog(Instance,DEBUG,"Found it!"); /* Lock the mutex, send back the data */ pthread_mutex_lock(&results_mutex); @@ -837,7 +816,6 @@ class ModuleSQL : public Module void* DispatcherThread(void* arg) { - log(DEBUG,"Starting Dispatcher thread, mysql version %d",mysql_get_client_version()); ModuleSQL* thismodule = (ModuleSQL*)arg; LoadDatabases(thismodule->Conf, thismodule->PublicServerInstance); @@ -846,12 +824,9 @@ void* DispatcherThread(void* arg) if ((QueueFD = socket(AF_FAMILY, SOCK_STREAM, 0)) == -1) { /* crap, we're out of sockets... */ - log(DEBUG,"QueueFD cant be created"); return NULL; } - log(DEBUG,"Initialize QueueFD to %d",QueueFD); - insp_sockaddr addr; #ifdef IPV6 @@ -869,12 +844,9 @@ void* DispatcherThread(void* arg) if (connect(QueueFD, (sockaddr*)&addr,sizeof(addr)) == -1) { /* wtf, we cant connect to it, but we just created it! */ - log(DEBUG,"QueueFD cant connect!"); return NULL; } - log(DEBUG,"Connect QUEUE FD"); - while (!giveup) { SQLConnection* conn = NULL; @@ -894,7 +866,6 @@ void* DispatcherThread(void* arg) /* Theres an item! */ if (conn) { - log(DEBUG,"Process Leading query"); conn->DoLeadingQuery(); /* XXX: Lock */ diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp index e4319aed5..b3427261a 100644 --- a/src/modules/extra/m_pgsql.cpp +++ b/src/modules/extra/m_pgsql.cpp @@ -152,7 +152,7 @@ public: void push(const SQLrequest &q) { - log(DEBUG, "QueryQueue::push(): Adding %s query to queue: %s", ((q.pri) ? "priority" : "non-priority"), q.query.q.c_str()); + //log(DEBUG, "QueryQueue::push(): Adding %s query to queue: %s", ((q.pri) ? "priority" : "non-priority"), q.query.q.c_str()); if(q.pri) priority.push_back(q); @@ -268,7 +268,7 @@ public: rows = PQntuples(res); cols = PQnfields(res); - log(DEBUG, "Created new PgSQL result; %d rows, %d columns, %s affected", rows, cols, PQcmdTuples(res)); + //log(DEBUG, "Created new PgSQL result; %d rows, %d columns, %s affected", rows, cols, PQcmdTuples(res)); } ~PgSQLresult() @@ -331,7 +331,7 @@ public: } else { - log(DEBUG, "PQgetvalue returned a null pointer..nobody wants to tell us what this means"); + //log(DEBUG, "PQgetvalue returned a null pointer..nobody wants to tell us what this means"); throw SQLbadColName(); } } @@ -662,7 +662,7 @@ public: SQLConn::SQLConn(InspIRCd* SI, ModulePgSQL* self, const SQLhost& hi) : InspSocket::InspSocket(SI), us(self), dbhost(hi.host), dbport(hi.port), dbname(hi.name), dbuser(hi.user), dbpass(hi.pass), ssl(hi.ssl), sql(NULL), status(CWRITE), qinprog(false) { - log(DEBUG, "Creating new PgSQL connection to database %s on %s:%u (%s/%s)", dbname.c_str(), dbhost.c_str(), dbport, dbuser.c_str(), dbpass.c_str()); + //log(DEBUG, "Creating new PgSQL connection to database %s on %s:%u (%s/%s)", dbname.c_str(), dbhost.c_str(), dbport, dbuser.c_str(), dbpass.c_str()); /* Some of this could be reviewed, unsure if I need to fill 'host' etc... * just copied this over from the InspSocket constructor. @@ -674,7 +674,7 @@ SQLConn::SQLConn(InspIRCd* SI, ModulePgSQL* self, const SQLhost& hi) this->ClosePending = false; - log(DEBUG,"No need to resolve %s", this->host); + ilog(Instance,DEBUG,"No need to resolve %s", this->host); if(!this->DoConnect()) @@ -690,18 +690,18 @@ SQLConn::~SQLConn() bool SQLConn::DoConnect() { - log(DEBUG, "SQLConn::DoConnect()"); + //log(DEBUG, "SQLConn::DoConnect()"); if(!(sql = PQconnectStart(MkInfoStr().c_str()))) { - log(DEBUG, "Couldn't allocate PGconn structure, aborting: %s", PQerrorMessage(sql)); + ilog(Instance,DEBUG, "Couldn't allocate PGconn structure, aborting: %s", PQerrorMessage(sql)); Close(); return false; } if(PQstatus(sql) == CONNECTION_BAD) { - log(DEBUG, "PQconnectStart failed: %s", PQerrorMessage(sql)); + ilog(Instance,DEBUG, "PQconnectStart failed: %s", PQerrorMessage(sql)); Close(); return false; } @@ -710,7 +710,7 @@ bool SQLConn::DoConnect() if(PQsetnonblocking(sql, 1) == -1) { - log(DEBUG, "Couldn't set connection nonblocking: %s", PQerrorMessage(sql)); + ilog(Instance,DEBUG, "Couldn't set connection nonblocking: %s", PQerrorMessage(sql)); Close(); return false; } @@ -719,13 +719,13 @@ bool SQLConn::DoConnect() * and then start polling it. */ - log(DEBUG, "Old DNS socket: %d", this->fd); + //log(DEBUG, "Old DNS socket: %d", this->fd); this->fd = PQsocket(sql); - log(DEBUG, "New SQL socket: %d", this->fd); + ilog(Instance,DEBUG, "New SQL socket: %d", this->fd); if(this->fd <= -1) { - log(DEBUG, "PQsocket says we have an invalid FD: %d", this->fd); + ilog(Instance,DEBUG, "PQsocket says we have an invalid FD: %d", this->fd); Close(); return false; } @@ -733,7 +733,7 @@ bool SQLConn::DoConnect() this->state = I_CONNECTING; if (!this->Instance->SE->AddFd(this->fd,false,X_ESTAB_MODULE)) { - log(DEBUG, "A PQsocket cant be added to the socket engine!"); + ilog(Instance,DEBUG, "A PQsocket cant be added to the socket engine!"); Close(); return false; } @@ -746,7 +746,7 @@ bool SQLConn::DoConnect() void SQLConn::Close() { - log(DEBUG,"SQLConn::Close"); + ilog(Instance,DEBUG,"SQLConn::Close"); if(this->fd > 01) Instance->socket_ref[this->fd] = NULL; @@ -769,23 +769,23 @@ bool SQLConn::DoPoll() switch(PQconnectPoll(sql)) { case PGRES_POLLING_WRITING: - log(DEBUG, "PGconnectPoll: PGRES_POLLING_WRITING"); + //log(DEBUG, "PGconnectPoll: PGRES_POLLING_WRITING"); WantWrite(); status = CWRITE; return DoPoll(); case PGRES_POLLING_READING: - log(DEBUG, "PGconnectPoll: PGRES_POLLING_READING"); + //log(DEBUG, "PGconnectPoll: PGRES_POLLING_READING"); status = CREAD; return true; case PGRES_POLLING_FAILED: - log(DEBUG, "PGconnectPoll: PGRES_POLLING_FAILED: %s", PQerrorMessage(sql)); + //log(DEBUG, "PGconnectPoll: PGRES_POLLING_FAILED: %s", PQerrorMessage(sql)); return false; case PGRES_POLLING_OK: - log(DEBUG, "PGconnectPoll: PGRES_POLLING_OK"); + //log(DEBUG, "PGconnectPoll: PGRES_POLLING_OK"); status = WWRITE; return DoConnectedPoll(); default: - log(DEBUG, "PGconnectPoll: wtf?"); + //log(DEBUG, "PGconnectPoll: wtf?"); return true; } } @@ -801,7 +801,7 @@ bool SQLConn::DoConnectedPoll() if(PQconsumeInput(sql)) { - log(DEBUG, "PQconsumeInput succeeded"); + ilog(Instance,DEBUG, "PQconsumeInput succeeded"); /* We just read stuff from the server, that counts as it being alive * so update the idle-since time :p @@ -810,16 +810,16 @@ bool SQLConn::DoConnectedPoll() if(PQisBusy(sql)) { - log(DEBUG, "Still busy processing command though"); + //log(DEBUG, "Still busy processing command though"); } else if(qinprog) { - log(DEBUG, "Looks like we have a result to process!"); + //log(DEBUG, "Looks like we have a result to process!"); /* Grab the request we're processing */ SQLrequest& query = queue.front(); - log(DEBUG, "ID is %lu", query.id); + ilog(Instance,DEBUG, "ID is %lu", query.id); /* Get a pointer to the module we're about to return the result to */ Module* to = query.GetSource(); @@ -844,7 +844,7 @@ bool SQLConn::DoConnectedPoll() /* ..and the result */ PgSQLresult reply(us, to, query.id, result); - log(DEBUG, "Got result, status code: %s; error message: %s", PQresStatus(PQresultStatus(result)), PQresultErrorMessage(result)); + ilog(Instance,DEBUG, "Got result, status code: %s; error message: %s", PQresStatus(PQresultStatus(result)), PQresultErrorMessage(result)); switch(PQresultStatus(result)) { @@ -867,7 +867,7 @@ bool SQLConn::DoConnectedPoll() * the pointer to NULL. We cannot just cancel the query as the result will still come * through at some point...and it could get messy if we play with invalid pointers... */ - log(DEBUG, "Looks like we're handling a zombie query from a module which unloaded before it got a result..fun. ID: %lu", query.id); + ilog(Instance,DEBUG, "Looks like we're handling a zombie query from a module which unloaded before it got a result..fun. ID: %lu", query.id); PQclear(result); } @@ -877,7 +877,7 @@ bool SQLConn::DoConnectedPoll() } else { - log(DEBUG, "Eh!? We just got a read event, and connection isn't busy..but no result :("); + ilog(Instance,DEBUG, "Eh!? We just got a read event, and connection isn't busy..but no result :("); } return true; @@ -889,7 +889,7 @@ bool SQLConn::DoConnectedPoll() * deserves to reconnect [/excuse] * Returning true so the core doesn't try and close the connection. */ - log(DEBUG, "PQconsumeInput failed: %s", PQerrorMessage(sql)); + ilog(Instance,DEBUG, "PQconsumeInput failed: %s", PQerrorMessage(sql)); Reconnect(); return true; } @@ -900,23 +900,23 @@ bool SQLConn::DoResetPoll() switch(PQresetPoll(sql)) { case PGRES_POLLING_WRITING: - log(DEBUG, "PGresetPoll: PGRES_POLLING_WRITING"); + //log(DEBUG, "PGresetPoll: PGRES_POLLING_WRITING"); WantWrite(); status = CWRITE; return DoPoll(); case PGRES_POLLING_READING: - log(DEBUG, "PGresetPoll: PGRES_POLLING_READING"); + //log(DEBUG, "PGresetPoll: PGRES_POLLING_READING"); status = CREAD; return true; case PGRES_POLLING_FAILED: - log(DEBUG, "PGresetPoll: PGRES_POLLING_FAILED: %s", PQerrorMessage(sql)); + //log(DEBUG, "PGresetPoll: PGRES_POLLING_FAILED: %s", PQerrorMessage(sql)); return false; case PGRES_POLLING_OK: - log(DEBUG, "PGresetPoll: PGRES_POLLING_OK"); + //log(DEBUG, "PGresetPoll: PGRES_POLLING_OK"); status = WWRITE; return DoConnectedPoll(); default: - log(DEBUG, "PGresetPoll: wtf?"); + //log(DEBUG, "PGresetPoll: wtf?"); return true; } } @@ -926,38 +926,38 @@ void SQLConn::ShowStatus() switch(PQstatus(sql)) { case CONNECTION_STARTED: - log(DEBUG, "PQstatus: CONNECTION_STARTED: Waiting for connection to be made."); + ilog(Instance,DEBUG, "PQstatus: CONNECTION_STARTED: Waiting for connection to be made."); break; case CONNECTION_MADE: - log(DEBUG, "PQstatus: CONNECTION_MADE: Connection OK; waiting to send."); + ilog(Instance,DEBUG, "PQstatus: CONNECTION_MADE: Connection OK; waiting to send."); break; case CONNECTION_AWAITING_RESPONSE: - log(DEBUG, "PQstatus: CONNECTION_AWAITING_RESPONSE: Waiting for a response from the server."); + ilog(Instance,DEBUG, "PQstatus: CONNECTION_AWAITING_RESPONSE: Waiting for a response from the server."); break; case CONNECTION_AUTH_OK: - log(DEBUG, "PQstatus: CONNECTION_AUTH_OK: Received authentication; waiting for backend start-up to finish."); + ilog(Instance,DEBUG, "PQstatus: CONNECTION_AUTH_OK: Received authentication; waiting for backend start-up to finish."); break; case CONNECTION_SSL_STARTUP: - log(DEBUG, "PQstatus: CONNECTION_SSL_STARTUP: Negotiating SSL encryption."); + ilog(Instance,DEBUG, "PQstatus: CONNECTION_SSL_STARTUP: Negotiating SSL encryption."); break; case CONNECTION_SETENV: - log(DEBUG, "PQstatus: CONNECTION_SETENV: Negotiating environment-driven parameter settings."); + ilog(Instance,DEBUG, "PQstatus: CONNECTION_SETENV: Negotiating environment-driven parameter settings."); break; default: - log(DEBUG, "PQstatus: ???"); + ilog(Instance,DEBUG, "PQstatus: ???"); } } bool SQLConn::OnDataReady() { /* Always return true here, false would close the socket - we need to do that ourselves with the pgsql API */ - log(DEBUG, "OnDataReady(): status = %s", StatusStr()); + ilog(Instance,DEBUG, "OnDataReady(): status = %s", StatusStr()); return DoEvent(); } @@ -965,21 +965,21 @@ bool SQLConn::OnDataReady() bool SQLConn::OnWriteReady() { /* Always return true here, false would close the socket - we need to do that ourselves with the pgsql API */ - log(DEBUG, "OnWriteReady(): status = %s", StatusStr()); + ilog(Instance,DEBUG, "OnWriteReady(): status = %s", StatusStr()); return DoEvent(); } bool SQLConn::OnConnected() { - log(DEBUG, "OnConnected(): status = %s", StatusStr()); + ilog(Instance,DEBUG, "OnConnected(): status = %s", StatusStr()); return DoEvent(); } bool SQLConn::Reconnect() { - log(DEBUG, "Initiating reconnect"); + ilog(Instance,DEBUG, "Initiating reconnect"); if(PQresetStart(sql)) { @@ -992,7 +992,7 @@ bool SQLConn::Reconnect() } else { - log(DEBUG, "Failed to initiate reconnect...fun"); + ilog(Instance,DEBUG, "Failed to initiate reconnect...fun"); return false; } } @@ -1017,13 +1017,13 @@ bool SQLConn::DoEvent() switch(PQflush(sql)) { case -1: - log(DEBUG, "Error flushing write queue: %s", PQerrorMessage(sql)); + ilog(Instance,DEBUG, "Error flushing write queue: %s", PQerrorMessage(sql)); break; case 0: - log(DEBUG, "Successfully flushed write queue (or there was nothing to write)"); + ilog(Instance,DEBUG, "Successfully flushed write queue (or there was nothing to write)"); break; case 1: - log(DEBUG, "Not all of the write queue written, triggering write event so we can have another go"); + ilog(Instance,DEBUG, "Not all of the write queue written, triggering write event so we can have another go"); WantWrite(); break; } @@ -1124,10 +1124,10 @@ SQLerror SQLConn::DoQuery(SQLrequest &req) #endif if(error) { - log(DEBUG, "Apparently PQescapeStringConn() failed somehow...don't know how or what to do..."); + ilog(Instance,DEBUG, "Apparently PQescapeStringConn() failed somehow...don't know how or what to do..."); } - log(DEBUG, "Appended %d bytes of escaped string onto the query", len); + ilog(Instance,DEBUG, "Appended %d bytes of escaped string onto the query", len); /* Incremenet queryend to the end of the newly escaped parameter */ queryend += len; @@ -1137,7 +1137,7 @@ SQLerror SQLConn::DoQuery(SQLrequest &req) } else { - log(DEBUG, "Found a substitution location but no parameter to substitute :|"); + ilog(Instance,DEBUG, "Found a substitution location but no parameter to substitute :|"); break; } } @@ -1151,27 +1151,27 @@ SQLerror SQLConn::DoQuery(SQLrequest &req) /* Null-terminate the query */ *queryend = 0; - log(DEBUG, "Attempting to dispatch query: %s", query); + ilog(Instance,DEBUG, "Attempting to dispatch query: %s", query); req.query.q = query; if(PQsendQuery(sql, query)) { - log(DEBUG, "Dispatched query successfully"); + ilog(Instance,DEBUG, "Dispatched query successfully"); qinprog = true; DELETE(query); return SQLerror(); } else { - log(DEBUG, "Failed to dispatch query: %s", PQerrorMessage(sql)); + ilog(Instance,DEBUG, "Failed to dispatch query: %s", PQerrorMessage(sql)); DELETE(query); return SQLerror(QSEND_FAIL, PQerrorMessage(sql)); } } } - log(DEBUG, "Can't query until connection is complete"); + ilog(Instance,DEBUG, "Can't query until connection is complete"); return SQLerror(BAD_CONN, "Can't query until connection is complete"); } diff --git a/src/modules/extra/m_sqllog.cpp b/src/modules/extra/m_sqllog.cpp index 4779e3cb2..4db8fe6f0 100644 --- a/src/modules/extra/m_sqllog.cpp +++ b/src/modules/extra/m_sqllog.cpp @@ -66,8 +66,6 @@ class QueryInfo // Nothing here and not sent yet SQLrequest req = SQLreq(MyMod, SQLModule, dbid, "", ""); - log(DEBUG,"State: %d",qs); - switch (qs) { case FIND_SOURCE: @@ -99,7 +97,7 @@ class QueryInfo } else { - log(DEBUG, "SQLrequest failed: %s", req.error.Str()); + //log(DEBUG, "SQLrequest failed: %s", req.error.Str()); } break; } @@ -116,7 +114,7 @@ class QueryInfo } else { - log(DEBUG, "SQLrequest failed: %s", req.error.Str()); + //log(DEBUG, "SQLrequest failed: %s", req.error.Str()); } break; @@ -148,7 +146,7 @@ class QueryInfo } else { - log(DEBUG, "SQLrequest failed: %s", req.error.Str()); + //log(DEBUG, "SQLrequest failed: %s", req.error.Str()); } break; } @@ -164,7 +162,7 @@ class QueryInfo } else { - log(DEBUG, "SQLrequest failed: %s", req.error.Str()); + //log(DEBUG, "SQLrequest failed: %s", req.error.Str()); } break; case FIND_HOST: @@ -196,7 +194,7 @@ class QueryInfo } else { - log(DEBUG, "SQLrequest failed: %s", req.error.Str()); + //log(DEBUG, "SQLrequest failed: %s", req.error.Str()); } break; } @@ -213,7 +211,7 @@ class QueryInfo } else { - log(DEBUG, "SQLrequest failed: %s", req.error.Str()); + //log(DEBUG, "SQLrequest failed: %s", req.error.Str()); } break; case INSERT_LOGENTRY: @@ -239,7 +237,7 @@ class QueryInfo } else { - log(DEBUG, "SQLrequest failed: %s", req.error.Str()); + //log(DEBUG, "SQLrequest failed: %s", req.error.Str()); } } break; diff --git a/src/modules/extra/m_sqlv2.h b/src/modules/extra/m_sqlv2.h index fbacb99f7..bce437858 100644 --- a/src/modules/extra/m_sqlv2.h +++ b/src/modules/extra/m_sqlv2.h @@ -149,7 +149,6 @@ public: SQLquery(const std::string &query) : q(query) { - log(DEBUG, "SQLquery constructor: %s", q.c_str()); } /** Initialize an SQLquery with a format string and parameters. @@ -159,7 +158,6 @@ public: SQLquery(const std::string &query, const ParamL ¶ms) : q(query), p(params) { - log(DEBUG, "SQLquery constructor with %d params: %s", p.size(), q.c_str()); } /** An overloaded operator for pushing parameters onto the parameter list |