Revision fc71bc10
Von Christian Ehringfeld vor mehr als 10 Jahren hinzugefügt
| src/logger.cpp | ||
|---|---|---|
|
QTextStream stream(&log);
|
||
|
const QString errorMsg = this->generateLogMsg(q.lastError());
|
||
|
if (!errorMsg.isEmpty()) {
|
||
|
qDebug() << errorMsg;
|
||
|
qWarning() << errorMsg;
|
||
|
stream << errorMsg;
|
||
|
}
|
||
|
if (logQuery || !errorMsg.isEmpty()) {
|
||
|
const QString query = this->generateLogMsg(q);
|
||
|
if (!query.isEmpty()) {
|
||
|
if(errorMsg.isEmpty()) {
|
||
|
qDebug() << query;
|
||
|
} else{
|
||
|
qWarning << query;
|
||
|
}
|
||
|
stream << query;
|
||
|
}
|
||
|
}
|
||
Auch abrufbar als: Unified diff
error msgs improved