Logging improvements

This commit is contained in:
Zach Fox 2018-04-05 13:04:09 -07:00
parent 8e46ebf83b
commit ac2721fe6a

View file

@ -75,6 +75,8 @@ void SnapshotUploader::uploadFailure(QNetworkReply& reply) {
if (replyString.size() == 0) {
replyString = reply.errorString();
}
replyString = replyString.left(1000); // Only print first 1000 characters of error
qDebug() << "Snapshot upload reply error (truncated):" << replyString;
emit DependencyManager::get<WindowScriptingInterface>()->snapshotShared(true, replyString); // maybe someday include _inWorldLocation, _filename?
this->deleteLater();
}
@ -87,10 +89,12 @@ void SnapshotUploader::createStorySuccess(QNetworkReply& reply) {
void SnapshotUploader::createStoryFailure(QNetworkReply& reply) {
QString replyString = reply.readAll();
qDebug() << "Error " << reply.errorString() << " uploading snapshot " << _pathname << " from " << _inWorldLocation;
qDebug() << "Error " << reply.errorString() << " uploading snapshot story " << _pathname << " from " << _inWorldLocation;
if (replyString.size() == 0) {
replyString = reply.errorString();
}
replyString = replyString.left(1000); // Only print first 1000 characters of error
qDebug() << "Snapshot story upload reply error (truncated):" << replyString;
emit DependencyManager::get<WindowScriptingInterface>()->snapshotShared(true, replyString);
this->deleteLater();
}