Enable verbose output in TDLibReceiver if DEBUG is defined
This should have no effect on release build.
This commit is contained in:
parent
2d18199724
commit
f17048d071
1 changed files with 7 additions and 1 deletions
|
@ -20,6 +20,12 @@
|
||||||
|
|
||||||
#define LOG(x) qDebug() << "[TDLibReceiver]" << x
|
#define LOG(x) qDebug() << "[TDLibReceiver]" << x
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
# define VERBOSE(x) LOG(x)
|
||||||
|
#else
|
||||||
|
# define VERBOSE(x)
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
const QString ID("id");
|
const QString ID("id");
|
||||||
const QString LIST("list");
|
const QString LIST("list");
|
||||||
|
@ -110,7 +116,7 @@ void TDLibReceiver::receiverLoop()
|
||||||
const char *result = td_json_client_receive(this->tdLibClient, WAIT_TIMEOUT);
|
const char *result = td_json_client_receive(this->tdLibClient, WAIT_TIMEOUT);
|
||||||
if (result) {
|
if (result) {
|
||||||
QJsonDocument receivedJsonDocument = QJsonDocument::fromJson(QByteArray(result));
|
QJsonDocument receivedJsonDocument = QJsonDocument::fromJson(QByteArray(result));
|
||||||
// Too much information qDebug().noquote() << "[TDLibReceiver] Raw result: " << receivedJsonDocument.toJson(QJsonDocument::Indented);
|
VERBOSE("Raw result:" << receivedJsonDocument.toJson(QJsonDocument::Indented).constData());
|
||||||
processReceivedDocument(receivedJsonDocument);
|
processReceivedDocument(receivedJsonDocument);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue