WebUI: Add command to get the logs

Add /query/getLog and /query/getPeerLog to respectively retrieve
the main log and the peer log.

GET /query/getLog
Params:
 - normal (bool): include normal messages (default true)
 - info (bool): include info messages (default true)
 - warning (bool): include warning messages (default true)
 - critical (bool): include critical messages (default true)
 - last_known_id (int): exclude messages with id <= 'last_known_id'

GET /query/getPeerLog
Params:
 - last_known_id (int): exclude messages with id <= 'last_known_id'
This commit is contained in:
Gabriele
2014-12-21 14:00:00 +01:00
parent 673b86c6e3
commit 01b73bf704
4 changed files with 115 additions and 0 deletions

View File

@@ -53,6 +53,8 @@ public:
static QByteArray getFilesForTorrent(const QString& hash);
static QByteArray getTransferInfo();
static QByteArray getTorrentsRatesLimits(QStringList& hashes, bool downloadLimits);
static QByteArray getLog(bool normal, bool info, bool warning, bool critical, int lastKnownId);
static QByteArray getPeerLog(int lastKnownId);
}; // class btjson
#endif // BTJSON_H