Skip to content

Commit

Permalink
* Stop logging every query.
Browse files Browse the repository at this point in the history
  • Loading branch information
muesli committed Jun 22, 2012
1 parent 707a8cb commit 6572f98
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/libtomahawk/database/TomahawkSqlQuery.cpp
Expand Up @@ -69,7 +69,7 @@ TomahawkSqlQuery::exec()
#endif
if ( log )
tLog( LOGSQL ) << "TomahawkSqlQuery::exec running in thread " << QThread::currentThread();

QTime t;
t.start();

Expand All @@ -88,10 +88,9 @@ TomahawkSqlQuery::exec()
showError();

int e = t.elapsed();

if ( log || e >= QUERY_THRESHOLD )
tLog( LOGSQL ) << "TomahawkSqlQuery::exec (" << t.elapsed() << "ms ):" << lastQuery();

return ret;
}

Expand Down
2 changes: 1 addition & 1 deletion src/libtomahawk/database/TomahawkSqlQuery.h
Expand Up @@ -24,7 +24,7 @@
#include <QSqlDriver>
#include <QSqlQuery>

#define TOMAHAWK_QUERY_ANALYZE 1
//#define TOMAHAWK_QUERY_ANALYZE 1

class TomahawkSqlQuery : public QSqlQuery
{
Expand Down

0 comments on commit 6572f98

Please sign in to comment.