Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some SQL debug logs to unclutter the output. #5634

Merged
merged 1 commit into from
May 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/common/ownsql.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,6 @@ bool SqlQuery::isPragma()

bool SqlQuery::exec()
{
qCDebug(lcSql) << "SQL exec" << _sql;

if (!_stmt) {
qCWarning(lcSql) << "Can't exec query, statement unprepared.";
return false;
Expand Down Expand Up @@ -324,8 +322,6 @@ bool SqlQuery::exec()
qCWarning(lcSql) << "IOERR system errno: " << sqlite3_system_errno(_db);
#endif
}
} else {
qCDebug(lcSql) << "Last exec affected" << numRowsAffected() << "rows.";
}
return (_errId == SQLITE_DONE); // either SQLITE_ROW or SQLITE_DONE
}
Expand Down
3 changes: 0 additions & 3 deletions src/common/ownsql.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,20 +135,17 @@ class OCSYNC_EXPORT SqlQuery
template<class T, typename std::enable_if<std::is_enum<T>::value, int>::type = 0>
void bindValue(int pos, const T &value)
{
qCDebug(lcSql) << "SQL bind" << pos << value;
bindValueInternal(pos, static_cast<int>(value));
}

template<class T, typename std::enable_if<!std::is_enum<T>::value, int>::type = 0>
void bindValue(int pos, const T &value)
{
qCDebug(lcSql) << "SQL bind" << pos << value;
bindValueInternal(pos, value);
}

void bindValue(int pos, const QByteArray &value)
{
qCDebug(lcSql) << "SQL bind" << pos << QString::fromUtf8(value);
bindValueInternal(pos, value);
}

Expand Down