diff --git a/libraries/animation/src/AnimClip.cpp b/libraries/animation/src/AnimClip.cpp index eeac8fadce..9dcf5822cd 100644 --- a/libraries/animation/src/AnimClip.cpp +++ b/libraries/animation/src/AnimClip.cpp @@ -110,7 +110,7 @@ void AnimClip::copyFromNetworkAnim() { for (int i = 0; i < animJointCount; i++) { int skeletonJoint = _skeleton->nameToJointIndex(animSkeleton.getJointName(i)); if (skeletonJoint == -1) { - qCWarning(animation) << "animation contains joint =" << animSkeleton.getJointName(i) << " which is not in the skeleton, url =" << _url; + qCWarning(animation) << "animation contains joint =" << animSkeleton.getJointName(i) << " which is not in the skeleton"; } jointMap.push_back(skeletonJoint); } diff --git a/libraries/animation/src/AnimNodeLoader.cpp b/libraries/animation/src/AnimNodeLoader.cpp index 34305c3ac6..dfa61e9fea 100644 --- a/libraries/animation/src/AnimNodeLoader.cpp +++ b/libraries/animation/src/AnimNodeLoader.cpp @@ -221,26 +221,26 @@ static NodeProcessFunc animNodeTypeToProcessFunc(AnimNode::Type type) { static AnimNode::Pointer loadNode(const QJsonObject& jsonObj, const QUrl& jsonUrl) { auto idVal = jsonObj.value("id"); if (!idVal.isString()) { - qCCritical(animation) << "AnimNodeLoader, bad string \"id\", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad string \"id\""; return nullptr; } QString id = idVal.toString(); auto typeVal = jsonObj.value("type"); if (!typeVal.isString()) { - qCCritical(animation) << "AnimNodeLoader, bad object \"type\", id =" << id << ", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad object \"type\", id =" << id; return nullptr; } QString typeStr = typeVal.toString(); AnimNode::Type type = stringToAnimNodeType(typeStr); if (type == AnimNode::Type::NumTypes) { - qCCritical(animation) << "AnimNodeLoader, unknown node type" << typeStr << ", id =" << id << ", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, unknown node type" << typeStr << ", id =" << id; return nullptr; } auto dataValue = jsonObj.value("data"); if (!dataValue.isObject()) { - qCCritical(animation) << "AnimNodeLoader, bad string \"data\", id =" << id << ", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad string \"data\", id =" << id; return nullptr; } auto dataObj = dataValue.toObject(); @@ -263,13 +263,13 @@ static AnimNode::Pointer loadNode(const QJsonObject& jsonObj, const QUrl& jsonUr auto childrenValue = jsonObj.value("children"); if (!childrenValue.isArray()) { - qCCritical(animation) << "AnimNodeLoader, bad array \"children\", id =" << id << ", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad array \"children\", id =" << id; return nullptr; } auto childrenArray = childrenValue.toArray(); for (const auto& childValue : childrenArray) { if (!childValue.isObject()) { - qCCritical(animation) << "AnimNodeLoader, bad object in \"children\", id =" << id << ", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad object in \"children\", id =" << id; return nullptr; } AnimNode::Pointer child = loadNode(childValue.toObject(), jsonUrl); @@ -353,14 +353,14 @@ static AnimNode::Pointer loadBlendLinearMoveNode(const QJsonObject& jsonObj, con std::vector characteristicSpeeds; auto speedsValue = jsonObj.value("characteristicSpeeds"); if (!speedsValue.isArray()) { - qCCritical(animation) << "AnimNodeLoader, bad array \"characteristicSpeeds\" in blendLinearMove node, id =" << id << ", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad array \"characteristicSpeeds\" in blendLinearMove node, id =" << id; return nullptr; } auto speedsArray = speedsValue.toArray(); for (const auto& speedValue : speedsArray) { if (!speedValue.isDouble()) { - qCCritical(animation) << "AnimNodeLoader, bad number in \"characteristicSpeeds\", id =" << id << ", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad number in \"characteristicSpeeds\", id =" << id; return nullptr; } float speedVal = (float)speedValue.toDouble(); @@ -434,7 +434,7 @@ static AnimNode::Pointer loadOverlayNode(const QJsonObject& jsonObj, const QStri auto boneSetEnum = stringToBoneSetEnum(boneSet); if (boneSetEnum == AnimOverlay::NumBoneSets) { - qCCritical(animation) << "AnimNodeLoader, unknown bone set =" << boneSet << ", defaulting to \"fullBody\", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, unknown bone set =" << boneSet << ", defaulting to \"fullBody\""; boneSetEnum = AnimOverlay::FullBodyBoneSet; } @@ -470,14 +470,14 @@ static AnimNode::Pointer loadManipulatorNode(const QJsonObject& jsonObj, const Q auto jointsValue = jsonObj.value("joints"); if (!jointsValue.isArray()) { - qCCritical(animation) << "AnimNodeLoader, bad array \"joints\" in controller node, id =" << id << ", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad array \"joints\" in controller node, id =" << id; return nullptr; } auto jointsArray = jointsValue.toArray(); for (const auto& jointValue : jointsArray) { if (!jointValue.isObject()) { - qCCritical(animation) << "AnimNodeLoader, bad state object in \"joints\", id =" << id << ", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad state object in \"joints\", id =" << id; return nullptr; } auto jointObj = jointValue.toObject(); @@ -490,13 +490,13 @@ static AnimNode::Pointer loadManipulatorNode(const QJsonObject& jsonObj, const Q AnimManipulator::JointVar::Type jointVarRotationType = stringToAnimManipulatorJointVarType(rotationType); if (jointVarRotationType == AnimManipulator::JointVar::Type::NumTypes) { - qCWarning(animation) << "AnimNodeLoader, bad rotationType in \"joints\", id =" << id << ", url =" << jsonUrl.toDisplayString(); + qCWarning(animation) << "AnimNodeLoader, bad rotationType in \"joints\", id =" << id; jointVarRotationType = AnimManipulator::JointVar::Type::Default; } AnimManipulator::JointVar::Type jointVarTranslationType = stringToAnimManipulatorJointVarType(translationType); if (jointVarTranslationType == AnimManipulator::JointVar::Type::NumTypes) { - qCWarning(animation) << "AnimNodeLoader, bad translationType in \"joints\", id =" << id << ", url =" << jsonUrl.toDisplayString(); + qCWarning(animation) << "AnimNodeLoader, bad translationType in \"joints\", id =" << id; jointVarTranslationType = AnimManipulator::JointVar::Type::Default; } @@ -512,14 +512,14 @@ AnimNode::Pointer loadInverseKinematicsNode(const QJsonObject& jsonObj, const QS auto targetsValue = jsonObj.value("targets"); if (!targetsValue.isArray()) { - qCCritical(animation) << "AnimNodeLoader, bad array \"targets\" in inverseKinematics node, id =" << id << ", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad array \"targets\" in inverseKinematics node, id =" << id; return nullptr; } auto targetsArray = targetsValue.toArray(); for (const auto& targetValue : targetsArray) { if (!targetValue.isObject()) { - qCCritical(animation) << "AnimNodeLoader, bad state object in \"targets\", id =" << id << ", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad state object in \"targets\", id =" << id; return nullptr; } auto targetObj = targetValue.toObject(); @@ -536,7 +536,7 @@ AnimNode::Pointer loadInverseKinematicsNode(const QJsonObject& jsonObj, const QS auto flexCoefficientsValue = targetObj.value("flexCoefficients"); if (!flexCoefficientsValue.isArray()) { - qCCritical(animation) << "AnimNodeLoader, bad or missing flexCoefficients array in \"targets\", id =" << id << ", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad or missing flexCoefficients array in \"targets\", id =" << id; return nullptr; } auto flexCoefficientsArray = flexCoefficientsValue.toArray(); @@ -554,10 +554,11 @@ AnimNode::Pointer loadInverseKinematicsNode(const QJsonObject& jsonObj, const QS AnimInverseKinematics::SolutionSource solutionSourceType = stringToSolutionSourceEnum(solutionSource); if (solutionSourceType != AnimInverseKinematics::SolutionSource::NumSolutionSources) { node->setSolutionSource(solutionSourceType); - } else { - qCWarning(animation) << "AnimNodeLoader, bad solutionSourceType in \"solutionSource\", id = " << id << ", url = " << jsonUrl.toDisplayString(); } } + else { + qCWarning(animation) << "AnimNodeLoader, bad solutionSourceType in \"solutionSource\", id = " << id; + } READ_OPTIONAL_STRING(solutionSourceVar, jsonObj); @@ -622,7 +623,7 @@ bool processStateMachineNode(AnimNode::Pointer node, const QJsonObject& jsonObj, auto statesValue = jsonObj.value("states"); if (!statesValue.isArray()) { - qCCritical(animation) << "AnimNodeLoader, bad array \"states\" in stateMachine node, id =" << nodeId << ", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad array \"states\" in stateMachine node, id =" << nodeId; return false; } @@ -641,7 +642,7 @@ bool processStateMachineNode(AnimNode::Pointer node, const QJsonObject& jsonObj, auto statesArray = statesValue.toArray(); for (const auto& stateValue : statesArray) { if (!stateValue.isObject()) { - qCCritical(animation) << "AnimNodeLoader, bad state object in \"states\", id =" << nodeId << ", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad state object in \"states\", id =" << nodeId; return false; } auto stateObj = stateValue.toObject(); @@ -657,7 +658,7 @@ bool processStateMachineNode(AnimNode::Pointer node, const QJsonObject& jsonObj, auto iter = childMap.find(id); if (iter == childMap.end()) { - qCCritical(animation) << "AnimNodeLoader, could not find stateMachine child (state) with nodeId =" << nodeId << "stateId =" << id << "url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, could not find stateMachine child (state) with nodeId =" << nodeId << "stateId =" << id; return false; } @@ -665,7 +666,7 @@ bool processStateMachineNode(AnimNode::Pointer node, const QJsonObject& jsonObj, if (!interpType.isEmpty()) { interpTypeEnum = stringToInterpType(interpType); if (interpTypeEnum == AnimStateMachine::InterpType::NumTypes) { - qCCritical(animation) << "AnimNodeLoader, bad interpType on stateMachine state, nodeId = " << nodeId << "stateId =" << id << "url = " << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad interpType on stateMachine state, nodeId = " << nodeId << "stateId =" << id; return false; } } @@ -688,14 +689,14 @@ bool processStateMachineNode(AnimNode::Pointer node, const QJsonObject& jsonObj, auto transitionsValue = stateObj.value("transitions"); if (!transitionsValue.isArray()) { - qCritical(animation) << "AnimNodeLoader, bad array \"transitions\" in stateMachine node, stateId =" << id << "nodeId =" << nodeId << "url =" << jsonUrl.toDisplayString(); + qCritical(animation) << "AnimNodeLoader, bad array \"transitions\" in stateMachine node, stateId =" << id << "nodeId =" << nodeId; return false; } auto transitionsArray = transitionsValue.toArray(); for (const auto& transitionValue : transitionsArray) { if (!transitionValue.isObject()) { - qCritical(animation) << "AnimNodeLoader, bad transition object in \"transtions\", stateId =" << id << "nodeId =" << nodeId << "url =" << jsonUrl.toDisplayString(); + qCritical(animation) << "AnimNodeLoader, bad transition object in \"transtions\", stateId =" << id << "nodeId =" << nodeId; return false; } auto transitionObj = transitionValue.toObject(); @@ -714,14 +715,14 @@ bool processStateMachineNode(AnimNode::Pointer node, const QJsonObject& jsonObj, if (iter != stateMap.end()) { srcState->addTransition(AnimStateMachine::State::Transition(transition.second.first, iter->second)); } else { - qCCritical(animation) << "AnimNodeLoader, bad state machine transtion from srcState =" << srcState->_id << "dstState =" << transition.second.second << "nodeId =" << nodeId << "url = " << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad state machine transtion from srcState =" << srcState->_id << "dstState =" << transition.second.second << "nodeId =" << nodeId; return false; } } auto iter = stateMap.find(currentState); if (iter == stateMap.end()) { - qCCritical(animation) << "AnimNodeLoader, bad currentState =" << currentState << "could not find child node" << "id =" << nodeId << "url = " << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad currentState =" << currentState << "could not find child node" << "id =" << nodeId; } smNode->setCurrentState(iter->second); @@ -745,7 +746,7 @@ AnimNode::Pointer AnimNodeLoader::load(const QByteArray& contents, const QUrl& j QJsonParseError error; auto doc = QJsonDocument::fromJson(contents, &error); if (error.error != QJsonParseError::NoError) { - qCCritical(animation) << "AnimNodeLoader, failed to parse json, error =" << error.errorString() << ", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, failed to parse json, error =" << error.errorString(); return nullptr; } QJsonObject obj = doc.object(); @@ -753,7 +754,7 @@ AnimNode::Pointer AnimNodeLoader::load(const QByteArray& contents, const QUrl& j // version QJsonValue versionVal = obj.value("version"); if (!versionVal.isString()) { - qCCritical(animation) << "AnimNodeLoader, bad string \"version\", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad string \"version\""; return nullptr; } QString version = versionVal.toString(); @@ -761,14 +762,14 @@ AnimNode::Pointer AnimNodeLoader::load(const QByteArray& contents, const QUrl& j // check version // AJT: TODO version check if (version != "1.0" && version != "1.1") { - qCCritical(animation) << "AnimNodeLoader, bad version number" << version << "expected \"1.0\", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad version number" << version << "expected \"1.0\""; return nullptr; } // root QJsonValue rootVal = obj.value("root"); if (!rootVal.isObject()) { - qCCritical(animation) << "AnimNodeLoader, bad object \"root\", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad object \"root\""; return nullptr; } diff --git a/libraries/animation/src/AnimationCache.cpp b/libraries/animation/src/AnimationCache.cpp index 06dfc0262a..501b9e964d 100644 --- a/libraries/animation/src/AnimationCache.cpp +++ b/libraries/animation/src/AnimationCache.cpp @@ -134,15 +134,13 @@ void Animation::downloadFinished(const QByteArray& data) { } void Animation::animationParseSuccess(HFMModel::Pointer hfmModel) { - - qCDebug(animation) << "Animation parse success" << _url.toDisplayString(); - + qCDebug(animation) << "Animation parse success"; _hfmModel = hfmModel; finishedLoading(true); } void Animation::animationParseError(int error, QString str) { - qCCritical(animation) << "Animation failure parsing " << _url.toDisplayString() << "code =" << error << str; + qCCritical(animation) << "Animation parse error, code =" << error << str; emit failed(QNetworkReply::UnknownContentError); finishedLoading(false); } diff --git a/libraries/animation/src/Rig.cpp b/libraries/animation/src/Rig.cpp index c2f909dd24..c0aa85acaa 100644 --- a/libraries/animation/src/Rig.cpp +++ b/libraries/animation/src/Rig.cpp @@ -1829,7 +1829,7 @@ void Rig::initAnimGraph(const QUrl& url) { emit onLoadComplete(); }); connect(_animLoader.get(), &AnimNodeLoader::error, [url](int error, QString str) { - qCritical(animation) << "Error loading" << url.toDisplayString() << "code = " << error << "str =" << str; + qCritical(animation) << "Error loading: code = " << error << "str =" << str; }); connect(_networkLoader.get(), &AnimNodeLoader::success, [this, weakSkeletonPtr, networkUrl](AnimNode::Pointer nodeIn) { @@ -1855,7 +1855,7 @@ void Rig::initAnimGraph(const QUrl& url) { }); connect(_networkLoader.get(), &AnimNodeLoader::error, [networkUrl](int error, QString str) { - qCritical(animation) << "Error loading" << networkUrl.toDisplayString() << "code = " << error << "str =" << str; + qCritical(animation) << "Error loading: code = " << error << "str =" << str; }); } } diff --git a/libraries/audio/src/Sound.cpp b/libraries/audio/src/Sound.cpp index da284f19a3..3807882b00 100644 --- a/libraries/audio/src/Sound.cpp +++ b/libraries/audio/src/Sound.cpp @@ -68,7 +68,7 @@ void Sound::downloadFinished(const QByteArray& data) { void Sound::soundProcessSuccess(QByteArray data, bool stereo, bool ambisonic, float duration) { - qCDebug(audio) << "Setting ready state for sound file" << _url.toDisplayString(); + qCDebug(audio) << "Setting ready state for sound file"; _byteArray = data; _isStereo = stereo; @@ -81,14 +81,14 @@ void Sound::soundProcessSuccess(QByteArray data, bool stereo, bool ambisonic, fl } void Sound::soundProcessError(int error, QString str) { - qCCritical(audio) << "Failed to process sound file" << _url.toDisplayString() << "code =" << error << str; + qCCritical(audio) << "Failed to process sound file: code =" << error << str; emit failed(QNetworkReply::UnknownContentError); finishedLoading(false); } void SoundProcessor::run() { - qCDebug(audio) << "Processing sound file" << _url.toDisplayString(); + qCDebug(audio) << "Processing sound file"; // replace our byte array with the downloaded data QByteArray rawAudioByteArray = QByteArray(_data); @@ -129,7 +129,7 @@ void SoundProcessor::run() { // since it's raw the only way for us to know that is if the file was called .stereo.raw if (fileName.toLower().endsWith("stereo.raw")) { _isStereo = true; - qCDebug(audio) << "Processing sound of" << rawAudioByteArray.size() << "bytes from" << _url << "as stereo audio file."; + qCDebug(audio) << "Processing sound of" << rawAudioByteArray.size() << "bytes as stereo audio file."; } // Process as 48khz RAW file diff --git a/libraries/audio/src/SoundCache.cpp b/libraries/audio/src/SoundCache.cpp index 2877de3d6f..845fd6ab4f 100644 --- a/libraries/audio/src/SoundCache.cpp +++ b/libraries/audio/src/SoundCache.cpp @@ -35,7 +35,6 @@ SharedSoundPointer SoundCache::getSound(const QUrl& url) { QSharedPointer SoundCache::createResource(const QUrl& url, const QSharedPointer& fallback, const void* extra) { - qCDebug(audio) << "Requesting sound at" << url.toString(); auto resource = QSharedPointer(new Sound(url), &Resource::deleter); resource->setLoadPriority(this, SOUNDS_LOADING_PRIORITY); return resource; diff --git a/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp b/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp index f694148b30..b5bc0b783d 100644 --- a/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp +++ b/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp @@ -1517,16 +1517,16 @@ void Avatar::setModelURLFinished(bool success) { const int MAX_SKELETON_DOWNLOAD_ATTEMPTS = 4; // NOTE: we don't want to be as generous as ResourceCache is, we only want 4 attempts if (_skeletonModel->getResourceDownloadAttemptsRemaining() <= 0 || _skeletonModel->getResourceDownloadAttempts() > MAX_SKELETON_DOWNLOAD_ATTEMPTS) { - qCWarning(avatars_renderer) << "Using default after failing to load Avatar model: " << _skeletonModelURL - << "after" << _skeletonModel->getResourceDownloadAttempts() << "attempts."; + qCWarning(avatars_renderer) << "Using default after failing to load Avatar model, " + << "after" << _skeletonModel->getResourceDownloadAttempts() << "attempts."; + // call _skeletonModel.setURL, but leave our copy of _skeletonModelURL alone. This is so that // we don't redo this every time we receive an identity packet from the avatar with the bad url. QMetaObject::invokeMethod(_skeletonModel.get(), "setURL", Qt::QueuedConnection, Q_ARG(QUrl, AvatarData::defaultFullAvatarModelUrl())); } else { - qCWarning(avatars_renderer) << "Avatar model: " << _skeletonModelURL - << "failed to load... attempts:" << _skeletonModel->getResourceDownloadAttempts() - << "out of:" << MAX_SKELETON_DOWNLOAD_ATTEMPTS; + qCWarning(avatars_renderer) << "Avatar model failed to load... attempts:" + << _skeletonModel->getResourceDownloadAttempts() << "out of:" << MAX_SKELETON_DOWNLOAD_ATTEMPTS; } } if (success) { diff --git a/libraries/avatars/src/AvatarData.cpp b/libraries/avatars/src/AvatarData.cpp index c529865b85..d9d4b57c31 100644 --- a/libraries/avatars/src/AvatarData.cpp +++ b/libraries/avatars/src/AvatarData.cpp @@ -1999,7 +1999,6 @@ void AvatarData::setSkeletonModelURL(const QUrl& skeletonModelURL) { } _skeletonModelURL = expanded; - qCDebug(avatars) << "Changing skeleton model for avatar" << getSessionUUID() << "to" << _skeletonModelURL.toString(); updateJointMappings(); diff --git a/libraries/entities/src/AmbientLightPropertyGroup.cpp b/libraries/entities/src/AmbientLightPropertyGroup.cpp index dbcb0eef75..38017a684b 100644 --- a/libraries/entities/src/AmbientLightPropertyGroup.cpp +++ b/libraries/entities/src/AmbientLightPropertyGroup.cpp @@ -42,7 +42,6 @@ void AmbientLightPropertyGroup::merge(const AmbientLightPropertyGroup& other) { void AmbientLightPropertyGroup::debugDump() const { qCDebug(entities) << " AmbientLightPropertyGroup: ---------------------------------------------"; qCDebug(entities) << " ambientIntensity:" << getAmbientIntensity(); - qCDebug(entities) << " ambientURL:" << getAmbientURL(); } void AmbientLightPropertyGroup::listChangedProperties(QList& out) { diff --git a/libraries/entities/src/AnimationPropertyGroup.cpp b/libraries/entities/src/AnimationPropertyGroup.cpp index 95bdae43b9..cf031f2d0f 100644 --- a/libraries/entities/src/AnimationPropertyGroup.cpp +++ b/libraries/entities/src/AnimationPropertyGroup.cpp @@ -173,7 +173,6 @@ void AnimationPropertyGroup::setFromOldAnimationSettings(const QString& value) { void AnimationPropertyGroup::debugDump() const { qCDebug(entities) << " AnimationPropertyGroup: ---------------------------------------------"; - qCDebug(entities) << " url:" << getURL() << " has changed:" << urlChanged(); qCDebug(entities) << " fps:" << getFPS() << " has changed:" << fpsChanged(); qCDebug(entities) << "currentFrame:" << getCurrentFrame() << " has changed:" << currentFrameChanged(); qCDebug(entities) << "allowTranslation:" << getAllowTranslation() << " has changed:" << allowTranslationChanged(); diff --git a/libraries/entities/src/EntityEditFilters.cpp b/libraries/entities/src/EntityEditFilters.cpp index 4865c0ba1e..c1afa6cecb 100644 --- a/libraries/entities/src/EntityEditFilters.cpp +++ b/libraries/entities/src/EntityEditFilters.cpp @@ -203,14 +203,13 @@ void EntityEditFilters::addFilter(EntityItemID entityID, QString filterURL) { auto scriptRequest = DependencyManager::get()->createResourceRequest( this, scriptURL, true, -1, "EntityEditFilters::addFilter"); if (!scriptRequest) { - qWarning() << "Could not create ResourceRequest for Entity Edit filter script at" << scriptURL.toString(); + qWarning() << "Could not create ResourceRequest for Entity Edit filter."; scriptRequestFinished(entityID); return; } // Agent.cpp sets up a timeout here, but that is unnecessary, as ResourceRequest has its own. connect(scriptRequest, &ResourceRequest::finished, this, [this, entityID]{ EntityEditFilters::scriptRequestFinished(entityID);} ); // FIXME: handle atp rquests setup here. See Agent::requestScript() - qInfo() << "Requesting script at URL" << qPrintable(scriptRequest->getUrl().toString()); scriptRequest->send(); qDebug() << "script request sent for entity " << entityID; } @@ -223,7 +222,7 @@ static bool hasCorrectSyntax(const QScriptProgram& program) { const auto error = syntaxCheck.errorMessage(); const auto line = QString::number(syntaxCheck.errorLineNumber()); const auto column = QString::number(syntaxCheck.errorColumnNumber()); - const auto message = QString("[SyntaxError] %1 in %2:%3(%4)").arg(error, program.fileName(), line, column); + const auto message = QString("[SyntaxError] %1 in %2(%3)").arg(error, line, column); qCritical() << qPrintable(message); return false; } @@ -236,8 +235,8 @@ static bool hadUncaughtExceptions(QScriptEngine& engine, const QString& fileName const auto line = QString::number(engine.uncaughtExceptionLineNumber()); engine.clearExceptions(); - static const QString SCRIPT_EXCEPTION_FORMAT = "[UncaughtException] %1 in %2:%3"; - auto message = QString(SCRIPT_EXCEPTION_FORMAT).arg(exception, fileName, line); + static const QString SCRIPT_EXCEPTION_FORMAT = "[UncaughtException] %1 on line %2"; + auto message = QString(SCRIPT_EXCEPTION_FORMAT).arg(exception, line); if (!backtrace.empty()) { static const auto lineSeparator = "\n "; message += QString("\n[Backtrace]%1%2").arg(lineSeparator, backtrace.join(lineSeparator)); @@ -376,7 +375,7 @@ void EntityEditFilters::scriptRequestFinished(EntityItemID entityID) { } } else if (scriptRequest) { const QString urlString = scriptRequest->getUrl().toString(); - qCritical() << "Failed to download script at" << urlString; + qCritical() << "Failed to download script"; // See HTTPResourceRequest::onRequestFinished for interpretation of codes. For example, a 404 is code 6 and 403 is 3. A timeout is 2. Go figure. qCritical() << "ResourceRequest error was" << scriptRequest->getResult(); } else { diff --git a/libraries/fbx/src/FBXReader.cpp b/libraries/fbx/src/FBXReader.cpp index 2cf57e54b4..00096cb4c6 100644 --- a/libraries/fbx/src/FBXReader.cpp +++ b/libraries/fbx/src/FBXReader.cpp @@ -2006,7 +2006,5 @@ HFMModel* readFBX(QIODevice* device, const QVariantHash& mapping, const QString& reader._loadLightmaps = loadLightmaps; reader._lightmapLevel = lightmapLevel; - qCDebug(modelformat) << "Reading FBX: " << url; - return reader.extractHFMModel(mapping, url); } diff --git a/libraries/fbx/src/GLTFReader.cpp b/libraries/fbx/src/GLTFReader.cpp index 9cd43ddf08..eb763cce90 100644 --- a/libraries/fbx/src/GLTFReader.cpp +++ b/libraries/fbx/src/GLTFReader.cpp @@ -937,7 +937,6 @@ HFMModel* GLTFReader::readGLTF(QByteArray& data, const QVariantHash& mapping, bool GLTFReader::readBinary(const QString& url, QByteArray& outdata) { QUrl binaryUrl = _url.resolved(url); - qCDebug(modelformat) << "binaryUrl: " << binaryUrl << " OriginalUrl: " << _url; bool success; std::tie(success, outdata) = requestData(binaryUrl); @@ -1006,8 +1005,6 @@ HFMTexture GLTFReader::getHFMTexture(const GLTFTexture& texture) { QString fname = QUrl(url).fileName(); QUrl textureUrl = _url.resolved(url); qCDebug(modelformat) << "fname: " << fname; - qCDebug(modelformat) << "textureUrl: " << textureUrl; - qCDebug(modelformat) << "Url: " << _url; fbxtex.name = fname; fbxtex.filename = textureUrl.toEncoded(); } @@ -1289,14 +1286,6 @@ void GLTFReader::hfmDebugDump(const HFMModel& hfmModel) { qCDebug(modelformat) << " normalTexture =" << mat.normalTexture.filename; qCDebug(modelformat) << " albedoTexture =" << mat.albedoTexture.filename; qCDebug(modelformat) << " opacityTexture =" << mat.opacityTexture.filename; - qCDebug(modelformat) << " glossTexture =" << mat.glossTexture.filename; - qCDebug(modelformat) << " roughnessTexture =" << mat.roughnessTexture.filename; - qCDebug(modelformat) << " specularTexture =" << mat.specularTexture.filename; - qCDebug(modelformat) << " metallicTexture =" << mat.metallicTexture.filename; - qCDebug(modelformat) << " emissiveTexture =" << mat.emissiveTexture.filename; - qCDebug(modelformat) << " occlusionTexture =" << mat.occlusionTexture.filename; - qCDebug(modelformat) << " scatteringTexture =" << mat.scatteringTexture.filename; - qCDebug(modelformat) << " lightmapTexture =" << mat.lightmapTexture.filename; qCDebug(modelformat) << " lightmapParams =" << mat.lightmapParams; diff --git a/libraries/fbx/src/GLTFReader.h b/libraries/fbx/src/GLTFReader.h index 44186504f0..54a9d8d9b6 100644 --- a/libraries/fbx/src/GLTFReader.h +++ b/libraries/fbx/src/GLTFReader.h @@ -361,9 +361,6 @@ struct GLTFImage { int bufferView; //required (or) QMap defined; void dump() { - if (defined["uri"]) { - qCDebug(modelformat) << "uri: " << uri; - } if (defined["mimeType"]) { qCDebug(modelformat) << "mimeType: " << mimeType; } diff --git a/libraries/gpu/src/gpu/Texture_ktx.cpp b/libraries/gpu/src/gpu/Texture_ktx.cpp index 1b7b552078..b400a81a1f 100644 --- a/libraries/gpu/src/gpu/Texture_ktx.cpp +++ b/libraries/gpu/src/gpu/Texture_ktx.cpp @@ -260,7 +260,7 @@ uint16 KtxStorage::minAvailableMipLevel() const { void KtxStorage::assignMipData(uint16 level, const storage::StoragePointer& storage) { if (level != _minMipLevelAvailable - 1) { - qWarning() << "Invalid level to be stored, expected: " << (_minMipLevelAvailable - 1) << ", got: " << level << " " << _filename.c_str(); + qWarning() << "Invalid level to be stored, expected: " << (_minMipLevelAvailable - 1) << ", got: " << level; return; } @@ -271,20 +271,20 @@ void KtxStorage::assignMipData(uint16 level, const storage::StoragePointer& stor auto& imageDesc = _ktxDescriptor->images[level]; if (storage->size() != imageDesc._imageSize) { qWarning() << "Invalid image size: " << storage->size() << ", expected: " << imageDesc._imageSize - << ", level: " << level << ", filename: " << QString::fromStdString(_filename); + << ", level: " << level; return; } std::lock_guard lock(*_cacheFileMutex); auto file = maybeOpenFile(); if (!file) { - qWarning() << "Failed to open file to assign mip data " << QString::fromStdString(_filename); + qWarning() << "Failed to open file to assign mip data "; return; } auto fileData = file->mutableData(); if (!fileData) { - qWarning() << "Failed to get mutable data for " << QString::fromStdString(_filename); + qWarning() << "Failed to get mutable data for "; return; } diff --git a/libraries/image/src/image/Image.cpp b/libraries/image/src/image/Image.cpp index 1355a24bf4..03d1f90499 100644 --- a/libraries/image/src/image/Image.cpp +++ b/libraries/image/src/image/Image.cpp @@ -214,8 +214,6 @@ QImage processRawImageData(QIODevice& content, const std::string& filename) { newImageReader.setDevice(&content); if (newImageReader.canRead()) { - qCWarning(imagelogging) << "Image file" << filename.c_str() << "has extension" << filenameExtension.c_str() - << "but is actually a" << qPrintable(newImageReader.format()) << "(recovering)"; return newImageReader.read(); } } @@ -238,7 +236,7 @@ gpu::TexturePointer processImage(std::shared_ptr content, const std:: // Validate that the image loaded if (imageWidth == 0 || imageHeight == 0 || image.format() == QImage::Format_Invalid) { QString reason(image.format() == QImage::Format_Invalid ? "(Invalid Format)" : "(Size is invalid)"); - qCWarning(imagelogging) << "Failed to load" << filename.c_str() << qPrintable(reason); + qCWarning(imagelogging) << "Failed to load:" << qPrintable(reason); return nullptr; } @@ -250,7 +248,7 @@ gpu::TexturePointer processImage(std::shared_ptr content, const std:: imageWidth = (int)(scaleFactor * (float)imageWidth + 0.5f); imageHeight = (int)(scaleFactor * (float)imageHeight + 0.5f); image = image.scaled(QSize(imageWidth, imageHeight), Qt::IgnoreAspectRatio, Qt::SmoothTransformation); - qCDebug(imagelogging).nospace() << "Downscaled " << filename.c_str() << " (" << + qCDebug(imagelogging).nospace() << "Downscaled " << " (" << QSize(originalWidth, originalHeight) << " to " << QSize(imageWidth, imageHeight) << ")"; } diff --git a/libraries/model-networking/src/model-networking/ModelCache.cpp b/libraries/model-networking/src/model-networking/ModelCache.cpp index 6430e4599e..e033bd8b0e 100644 --- a/libraries/model-networking/src/model-networking/ModelCache.cpp +++ b/libraries/model-networking/src/model-networking/ModelCache.cpp @@ -69,7 +69,6 @@ void GeometryMappingResource::downloadFinished(const QByteArray& data) { QString filename = _mapping.value("filename").toString(); if (filename.isNull()) { - qCDebug(modelnetworking) << "Mapping file" << _url << "has no \"filename\" field"; finishedLoading(false); } else { QUrl url = _url.resolved(filename); @@ -176,7 +175,6 @@ void GeometryReader::run() { }); if (!_resource.data()) { - qCWarning(modelnetworking) << "Abandoning load of" << _url << "; resource was deleted"; return; } @@ -241,8 +239,6 @@ void GeometryReader::run() { } } catch (const QString& error) { - qCDebug(modelnetworking) << "Error parsing model for" << _url << ":" << error; - auto resource = _resource.toStrongRef(); if (resource) { QMetaObject::invokeMethod(resource.data(), "finishedLoading", diff --git a/libraries/model-networking/src/model-networking/TextureCache.cpp b/libraries/model-networking/src/model-networking/TextureCache.cpp index 740af44591..8ee8f31a8f 100644 --- a/libraries/model-networking/src/model-networking/TextureCache.cpp +++ b/libraries/model-networking/src/model-networking/TextureCache.cpp @@ -576,7 +576,6 @@ bool NetworkTexture::handleFailedRequest(ResourceRequest::Result result) { auto newPath = _request->getRelativePathUrl(); if (newPath.fileName().endsWith(".ktx")) { - qDebug() << "Redirecting to" << newPath << "from" << _url; _currentlyLoadingResourceType = ResourceType::KTX; _activeUrl = newPath; _shouldFailOnRedirect = false; @@ -622,7 +621,6 @@ void NetworkTexture::startMipRangeRequest(uint16_t low, uint16_t high) { this, _activeUrl, true, -1, "NetworkTexture::startMipRangeRequest"); if (!_ktxMipRequest) { - qCWarning(networking).noquote() << "Failed to get request for" << _url.toDisplayString(); PROFILE_ASYNC_END(resource, "Resource:" + getType(), QString::number(_requestID)); return; @@ -681,12 +679,6 @@ void NetworkTexture::ktxInitialDataRequestFinished() { if (result == ResourceRequest::Success) { -// This is an expensive operation that we do not want in release. -#ifdef DEBUG - auto extraInfo = _url == _activeUrl ? "" : QString(", %1").arg(_activeUrl.toDisplayString()); - qCDebug(networking).noquote() << QString("Request finished for %1%2").arg(_url.toDisplayString(), extraInfo); -#endif - _ktxHeaderData = _ktxHeaderRequest->getData(); _ktxHighMipData = _ktxMipRequest->getData(); handleFinishedInitialLoad(); @@ -731,8 +723,6 @@ void NetworkTexture::ktxMipRequestFinished() { auto result = _ktxMipRequest->getResult(); if (result == ResourceRequest::Success) { - auto extraInfo = _url == _activeUrl ? "" : QString(", %1").arg(_activeUrl.toDisplayString()); - qCDebug(networking).noquote() << QString("Request finished for %1%2").arg(_url.toDisplayString(), extraInfo); if (_ktxResourceState == REQUESTING_MIP) { Q_ASSERT(_ktxMipLevelRangeInFlight.first != NULL_MIP_LEVEL); @@ -835,7 +825,6 @@ void NetworkTexture::handleFinishedInitialLoad() { auto header = reinterpret_cast(ktxHeaderData.data()); if (!ktx::checkIdentifier(header->identifier)) { - qWarning() << "Cannot load " << url << ", invalid header identifier"; QMetaObject::invokeMethod(resource.data(), "setImage", Q_ARG(gpu::TexturePointer, nullptr), Q_ARG(int, 0), @@ -845,7 +834,6 @@ void NetworkTexture::handleFinishedInitialLoad() { auto kvSize = header->bytesOfKeyValueData; if (kvSize > (ktxHeaderData.size() - ktx::KTX_HEADER_SIZE)) { - qWarning() << "Cannot load " << url << ", did not receive all kv data with initial request"; QMetaObject::invokeMethod(resource.data(), "setImage", Q_ARG(gpu::TexturePointer, nullptr), Q_ARG(int, 0), @@ -857,7 +845,6 @@ void NetworkTexture::handleFinishedInitialLoad() { auto imageDescriptors = header->generateImageDescriptors(); if (imageDescriptors.size() == 0) { - qWarning(networking) << "Failed to process ktx file " << url; QMetaObject::invokeMethod(resource.data(), "setImage", Q_ARG(gpu::TexturePointer, nullptr), Q_ARG(int, 0), @@ -987,7 +974,6 @@ void NetworkTexture::loadMetaContent(const QByteArray& content) { TextureMeta meta; if (!TextureMeta::deserialize(content, &meta)) { - qWarning() << "Failed to read texture meta from " << _url; return; } @@ -999,7 +985,6 @@ void NetworkTexture::loadMetaContent(const QByteArray& content) { if (backend->supportedTextureFormat(elFormat)) { auto url = pair.second; if (url.fileName().endsWith(TEXTURE_META_EXTENSION)) { - qWarning() << "Found a texture meta URL inside of the texture meta file at" << _activeUrl; continue; } @@ -1044,7 +1029,6 @@ void NetworkTexture::loadMetaContent(const QByteArray& content) { return; } - qWarning() << "Failed to find supported texture type in " << _activeUrl; Resource::handleFailedRequest(ResourceRequest::NotFound); } @@ -1135,7 +1119,6 @@ void ImageReader::run() { void ImageReader::read() { auto resource = _resource.lock(); // to ensure the resource is still needed if (!resource) { - qCWarning(modelnetworking) << "Abandoning load of" << _url << "; could not get strong ref"; return; } auto networkTexture = resource.staticCast(); @@ -1195,7 +1178,6 @@ void ImageReader::read() { texture = image::processImage(std::move(buffer), _url.toString().toStdString(), _maxNumPixels, networkTexture->getTextureType(), shouldCompress, target); if (!texture) { - qCWarning(modelnetworking) << "Could not process:" << _url; QMetaObject::invokeMethod(resource.data(), "setImage", Q_ARG(gpu::TexturePointer, texture), Q_ARG(int, 0), @@ -1217,13 +1199,9 @@ void ImageReader::read() { size_t length = memKtx->_storage->size(); auto& ktxCache = textureCache->_ktxCache; auto file = ktxCache->writeFile(data, KTXCache::Metadata(hash, length)); - if (!file) { - qCWarning(modelnetworking) << _url << "file cache failed"; - } else { + if (file) { texture->setKtxBacking(file); } - } else { - qCWarning(modelnetworking) << "Unable to serialize texture to KTX " << _url; } // We replace the texture with the one stored in the cache. This deals with the possible race condition of two different diff --git a/libraries/networking/src/AssetClient.cpp b/libraries/networking/src/AssetClient.cpp index 0a5c2c46c6..b9a3e6f61e 100644 --- a/libraries/networking/src/AssetClient.cpp +++ b/libraries/networking/src/AssetClient.cpp @@ -225,7 +225,6 @@ MiniPromise::Promise AssetClient::saveToCacheAsync(const QUrl& url, const QByteA if (ioDevice) { ioDevice->write(data); cache->insert(ioDevice); - qCDebug(asset_client) << url.toDisplayString() << "saved to disk cache ("<< data.size()<<" bytes)"; deferred->resolve({ { "url", url }, { "success", true }, @@ -235,7 +234,7 @@ MiniPromise::Promise AssetClient::saveToCacheAsync(const QUrl& url, const QByteA { "lastModified", metaData.lastModified().toString().isEmpty() ? QDateTime() : metaData.lastModified() }, }); } else { - auto error = QString("Could not save %1 to disk cache").arg(url.toDisplayString()); + auto error = QString("Could not save to disk cache"); qCWarning(asset_client) << error; deferred->reject(CACHE_ERROR_MESSAGE.arg(__FUNCTION__).arg(error)); } diff --git a/libraries/networking/src/AssetResourceRequest.cpp b/libraries/networking/src/AssetResourceRequest.cpp index 6f5b13f98d..bc34243c66 100644 --- a/libraries/networking/src/AssetResourceRequest.cpp +++ b/libraries/networking/src/AssetResourceRequest.cpp @@ -218,9 +218,6 @@ void AssetResourceRequest::onDownloadProgress(qint64 bytesReceived, qint64 bytes int percentage = roundf((float) bytesReceived / (float) bytesTotal * 100.0f); - qCDebug(networking).nospace() << "Progress for " << _url.path() << " - " - << bytesReceived << " of " << bytesTotal << " bytes - " << percentage << "%"; - _lastProgressDebug = now; } } diff --git a/libraries/networking/src/AssetUpload.cpp b/libraries/networking/src/AssetUpload.cpp index f1c84e474a..d4dfa6554b 100644 --- a/libraries/networking/src/AssetUpload.cpp +++ b/libraries/networking/src/AssetUpload.cpp @@ -76,10 +76,6 @@ void AssetUpload::start() { // ask the AssetClient to upload the asset and emit the proper signals from the passed callback auto assetClient = DependencyManager::get(); - - if (!_filename.isEmpty()) { - qCDebug(asset_client) << "Attempting to upload" << _filename << "to asset-server."; - } assetClient->uploadAsset(_data, [this](bool responseReceived, AssetUtils::AssetServerError error, const QString& hash){ if (!responseReceived) { diff --git a/libraries/networking/src/AssetUtils.cpp b/libraries/networking/src/AssetUtils.cpp index 8d3d313ff9..6fb914a8b2 100644 --- a/libraries/networking/src/AssetUtils.cpp +++ b/libraries/networking/src/AssetUtils.cpp @@ -67,10 +67,7 @@ QByteArray loadFromCache(const QUrl& url) { // caller is responsible for the deletion of the ioDevice, hence the unique_ptr if (auto ioDevice = std::unique_ptr(cache->data(url))) { - qCDebug(asset_client) << url.toDisplayString() << "loaded from disk cache."; return ioDevice->readAll(); - } else { - qCDebug(asset_client) << url.toDisplayString() << "not in disk cache"; } } @@ -91,10 +88,8 @@ bool saveToCache(const QUrl& url, const QByteArray& file) { if (auto ioDevice = cache->prepare(metaData)) { ioDevice->write(file); cache->insert(ioDevice); - qCDebug(asset_client) << url.toDisplayString() << "saved to disk cache"; return true; } - qCWarning(asset_client) << "Could not save" << url.toDisplayString() << "to disk cache."; } } diff --git a/libraries/networking/src/FileResourceRequest.cpp b/libraries/networking/src/FileResourceRequest.cpp index 1a4096bc02..11489f13bd 100644 --- a/libraries/networking/src/FileResourceRequest.cpp +++ b/libraries/networking/src/FileResourceRequest.cpp @@ -46,9 +46,6 @@ void FileResourceRequest::doSend() { QFileSelector fileSelector; fileSelector.setExtraSelectors(FileUtils::getFileSelectors()); filename = fileSelector.select(filename); - if (filename != originalFilename) { - qCDebug(resourceLog) << "Using" << filename << "instead of" << originalFilename; - } } if (!_byteRange.isValid()) { diff --git a/libraries/networking/src/HTTPResourceRequest.cpp b/libraries/networking/src/HTTPResourceRequest.cpp index a34f92aaa6..e26f27adcf 100644 --- a/libraries/networking/src/HTTPResourceRequest.cpp +++ b/libraries/networking/src/HTTPResourceRequest.cpp @@ -208,7 +208,7 @@ void HTTPResourceRequest::onDownloadProgress(qint64 bytesReceived, qint64 bytesT } void HTTPResourceRequest::onTimeout() { - qDebug() << "Timeout: " << _url << ":" << _reply->isFinished(); + qDebug() << "Timeout: " << _reply->isFinished(); Q_ASSERT(_state == InProgress); _reply->disconnect(this); _reply->abort(); diff --git a/libraries/networking/src/MappingRequest.cpp b/libraries/networking/src/MappingRequest.cpp index 96f4b63c59..263f8d023c 100644 --- a/libraries/networking/src/MappingRequest.cpp +++ b/libraries/networking/src/MappingRequest.cpp @@ -96,9 +96,6 @@ void GetMappingRequest::doStart() { // if it did grab that re-directed path if (_wasRedirected) { _redirectedPath = message->readString(); - qDebug() << "Got redirected from " << _path << " to " << _redirectedPath; - } else { - qDebug() << "Not redirected: " << _path; } } diff --git a/libraries/networking/src/ResourceCache.cpp b/libraries/networking/src/ResourceCache.cpp index 7aad8d468a..76d1de4b47 100644 --- a/libraries/networking/src/ResourceCache.cpp +++ b/libraries/networking/src/ResourceCache.cpp @@ -646,7 +646,7 @@ void Resource::attemptRequest() { _startedLoading = true; if (_attempts > 0) { - qCDebug(networking).noquote() << "Server unavailable for" << _url + qCDebug(networking).noquote() << "Server unavailable " << "- retrying asset load - attempt" << _attempts << " of " << MAX_ATTEMPTS; } @@ -658,11 +658,9 @@ void Resource::attemptRequest() { void Resource::finishedLoading(bool success) { if (success) { - qCDebug(networking).noquote() << "Finished loading:" << _url.toDisplayString(); _loadPriorities.clear(); _loaded = true; } else { - qCDebug(networking).noquote() << "Failed to load:" << _url.toDisplayString(); _failedToLoad = true; } emit finished(success); @@ -692,7 +690,6 @@ void Resource::makeRequest() { this, _activeUrl, true, -1, "Resource::makeRequest"); if (!_request) { - qCDebug(networking).noquote() << "Failed to get request for" << _url.toDisplayString(); ResourceCache::requestCompleted(_self); finishedLoading(false); PROFILE_ASYNC_END(resource, "Resource:" + getType(), QString::number(_requestID)); @@ -744,8 +741,6 @@ void Resource::handleReplyFinished() { auto result = _request->getResult(); if (result == ResourceRequest::Success) { - auto extraInfo = _url == _activeUrl ? "" : QString(", %1").arg(_activeUrl.toDisplayString()); - qCDebug(networking).noquote() << QString("Request finished for %1%2").arg(_activeUrl.toDisplayString(), extraInfo); auto relativePathURL = _request->getRelativePathUrl(); if (!relativePathURL.isEmpty()) { @@ -768,7 +763,7 @@ bool Resource::handleFailedRequest(ResourceRequest::Result result) { bool willRetry = false; switch (result) { case ResourceRequest::Result::Timeout: { - qCDebug(networking) << "Timed out loading" << _url << "received" << _bytesReceived << "total" << _bytesTotal; + qCDebug(networking) << "Timed out, received" << _bytesReceived << "total" << _bytesTotal; // Fall through to other cases } // FALLTHRU @@ -776,13 +771,13 @@ bool Resource::handleFailedRequest(ResourceRequest::Result result) { _attempts++; _attemptsRemaining--; - qCDebug(networking) << "Retryable error while loading" << _url << "attempt:" << _attempts << "attemptsRemaining:" << _attemptsRemaining; + qCDebug(networking) << "Retryable error while loading: attempt:" << _attempts << "attemptsRemaining:" << _attemptsRemaining; // retry with increasing delays const int BASE_DELAY_MS = 1000; if (_attempts < MAX_ATTEMPTS) { auto waitTime = BASE_DELAY_MS * (int)pow(2.0, _attempts); - qCDebug(networking).noquote() << "Server unavailable for" << _url << "- may retry in" << waitTime << "ms" + qCDebug(networking).noquote() << "Server unavailable for - may retry in" << waitTime << "ms" << "if resource is still needed"; QTimer::singleShot(waitTime, this, &Resource::attemptRequest); willRetry = true; @@ -793,7 +788,7 @@ bool Resource::handleFailedRequest(ResourceRequest::Result result) { // FALLTHRU default: { _attemptsRemaining = 0; - qCDebug(networking) << "Error loading " << _url << "attempt:" << _attempts << "attemptsRemaining:" << _attemptsRemaining; + qCDebug(networking) << "Error loading, attempt:" << _attempts << "attemptsRemaining:" << _attemptsRemaining; auto error = (result == ResourceRequest::Timeout) ? QNetworkReply::TimeoutError : QNetworkReply::UnknownNetworkError; emit failed(error); diff --git a/libraries/octree/src/Octree.cpp b/libraries/octree/src/Octree.cpp index 06db92bcf7..088a1f0121 100644 --- a/libraries/octree/src/Octree.cpp +++ b/libraries/octree/src/Octree.cpp @@ -679,7 +679,6 @@ bool Octree::readFromFile(const char* fileName) { QFile file(qFileName); if (!file.open(QIODevice::ReadOnly)) { - qCritical() << "unable to open for reading: " << fileName; return false; } @@ -687,8 +686,6 @@ bool Octree::readFromFile(const char* fileName) { QFileInfo fileInfo(qFileName); uint64_t fileLength = fileInfo.size(); - qCDebug(octree) << "Loading file" << qFileName << "..."; - bool success = readFromStream(fileLength, fileInputStream); file.close(); @@ -699,14 +696,12 @@ bool Octree::readFromFile(const char* fileName) { bool Octree::readJSONFromGzippedFile(QString qFileName) { QFile file(qFileName); if (!file.open(QIODevice::ReadOnly)) { - qCritical() << "Cannot open gzipped json file for reading: " << qFileName; return false; } QByteArray compressedJsonData = file.readAll(); QByteArray jsonData; if (!gunzip(compressedJsonData, jsonData)) { - qCritical() << "json File not in gzip format: " << qFileName; return false; } diff --git a/libraries/octree/src/OctreeDataUtils.cpp b/libraries/octree/src/OctreeDataUtils.cpp index 44a56fe97a..3da498d7f3 100644 --- a/libraries/octree/src/OctreeDataUtils.cpp +++ b/libraries/octree/src/OctreeDataUtils.cpp @@ -24,7 +24,6 @@ bool readOctreeFile(QString path, QJsonDocument* doc) { QFile file(path); if (!file.open(QIODevice::ReadOnly)) { - qCritical() << "Cannot open json file for reading: " << path; return false; } diff --git a/libraries/octree/src/OctreePersistThread.cpp b/libraries/octree/src/OctreePersistThread.cpp index 8b1d766418..5a20f55a76 100644 --- a/libraries/octree/src/OctreePersistThread.cpp +++ b/libraries/octree/src/OctreePersistThread.cpp @@ -127,7 +127,6 @@ void OctreePersistThread::handleOctreeDataFileReply(QSharedPointerclearDirtyBit(); // the tree is clean since we just loaded it - qCDebug(octree, "DONE loading Octrees from file... fileRead=%s", debug::valueOf(persistentFileRead)); unsigned long nodeCount = OctreeElement::getNodeCount(); unsigned long internalNodeCount = OctreeElement::getInternalNodeCount(); diff --git a/libraries/procedural/src/procedural/Procedural.cpp b/libraries/procedural/src/procedural/Procedural.cpp index 1c082ed250..7095732d53 100644 --- a/libraries/procedural/src/procedural/Procedural.cpp +++ b/libraries/procedural/src/procedural/Procedural.cpp @@ -157,13 +157,11 @@ void Procedural::setProceduralData(const ProceduralData& proceduralData) { } if (!shaderUrl.isValid()) { - qCWarning(proceduralLog) << "Invalid shader URL: " << shaderUrl; return; } if (shaderUrl.isLocalFile()) { if (!QFileInfo(shaderUrl.toLocalFile()).exists()) { - qCWarning(proceduralLog) << "Invalid shader URL, missing local file: " << shaderUrl; return; } _shaderPath = shaderUrl.toLocalFile(); diff --git a/libraries/script-engine/src/AssetScriptingInterface.cpp b/libraries/script-engine/src/AssetScriptingInterface.cpp index 4096de9434..e389bd8446 100644 --- a/libraries/script-engine/src/AssetScriptingInterface.cpp +++ b/libraries/script-engine/src/AssetScriptingInterface.cpp @@ -398,7 +398,6 @@ void AssetScriptingInterface::loadFromCache(QScriptValue options, QScriptValue s bool AssetScriptingInterface::canWriteCacheValue(const QUrl& url) { auto scriptEngine = qobject_cast(engine()); if (!scriptEngine) { - qCDebug(scriptengine) << __FUNCTION__ << "invalid script engine" << url; return false; } // allow cache writes only from Client, EntityServer and Agent scripts @@ -407,7 +406,6 @@ bool AssetScriptingInterface::canWriteCacheValue(const QUrl& url) { scriptEngine->isAgentScript() ); if (!isAllowedContext) { - qCDebug(scriptengine) << __FUNCTION__ << "invalid context" << scriptEngine->getContext() << url; return false; } return true; @@ -430,7 +428,6 @@ void AssetScriptingInterface::saveToCache(const QUrl& rawURL, const QByteArray& auto atpURL = AssetUtils::getATPUrl(hashDataHex(data)); atpURL.setQuery(url.query()); atpURL.setFragment(url.fragment()); - qCDebug(scriptengine) << "autogenerated ATP URL" << url << "=>" << atpURL; url = atpURL; } auto hash = AssetUtils::extractAssetHash(url.toDisplayString()); @@ -440,7 +437,6 @@ void AssetScriptingInterface::saveToCache(const QUrl& rawURL, const QByteArray& JS_VERIFY(url.scheme() == "atp" || url.scheme() == "cache", "only 'atp' and 'cache' URL schemes supported"); JS_VERIFY(hash.isEmpty() || hash == hashDataHex(data), QString("invalid checksum hash for atp:HASH style URL (%1 != %2)").arg(hash, hashDataHex(data))); - // qCDebug(scriptengine) << "saveToCache" << url.toDisplayString() << data << hash << metadata; jsPromiseReady(Parent::saveToCache(url, data, metadata), scope, callback); } diff --git a/libraries/script-engine/src/BatchLoader.cpp b/libraries/script-engine/src/BatchLoader.cpp index 4e2943d536..fd38f1b7b1 100644 --- a/libraries/script-engine/src/BatchLoader.cpp +++ b/libraries/script-engine/src/BatchLoader.cpp @@ -51,8 +51,6 @@ void BatchLoader::start(int maxRetries) { for (const auto& rawURL : _urls) { QUrl url = expandScriptUrl(normalizeScriptURL(rawURL)); - qCDebug(scriptengine) << "Loading script at " << url; - auto scriptCache = DependencyManager::get(); // Use a proxy callback to handle the call and emit the signal in a thread-safe way. @@ -65,10 +63,8 @@ void BatchLoader::start(int maxRetries) { _status.insert(url, status); if (isURL && success) { _data.insert(url, contents); - qCDebug(scriptengine) << "Loaded: " << url; } else { _data.insert(url, QString()); - qCDebug(scriptengine) << "Could not load: " << url << status; } if (!_finished && _urls.size() == _data.size()) { diff --git a/libraries/script-engine/src/FileScriptingInterface.cpp b/libraries/script-engine/src/FileScriptingInterface.cpp index 4e07877d57..269a5179c1 100644 --- a/libraries/script-engine/src/FileScriptingInterface.cpp +++ b/libraries/script-engine/src/FileScriptingInterface.cpp @@ -38,10 +38,7 @@ FileScriptingInterface::FileScriptingInterface(QObject* parent) : QObject(parent } void FileScriptingInterface::runUnzip(QString path, QUrl url, bool autoAdd, bool isZip, bool isBlocks) { - qCDebug(scriptengine) << "Url that was downloaded: " + url.toString(); - qCDebug(scriptengine) << "Path where download is saved: " + path; QString fileName = "/" + path.section("/", -1); - qCDebug(scriptengine) << "Filename: " << fileName; QString tempDir = path; if (!isZip) { tempDir.remove(fileName); @@ -59,9 +56,7 @@ void FileScriptingInterface::runUnzip(QString path, QUrl url, bool autoAdd, bool QStringList fileList = unzipFile(path, tempDir); - if (!fileList.isEmpty()) { - qCDebug(scriptengine) << "First file to upload: " + fileList.first(); - } else { + if(fileList.isEmpty()) { qCDebug(scriptengine) << "Unzip failed"; } @@ -131,7 +126,6 @@ QString FileScriptingInterface::convertUrlToPath(QUrl url) { QString newUrl; QString oldUrl = url.toString(); newUrl = oldUrl.section("filename=", 1, 1); - qCDebug(scriptengine) << "Filename should be: " + newUrl; return newUrl; } @@ -149,14 +143,12 @@ void FileScriptingInterface::downloadZip(QString path, const QString link) { // this function is not in use void FileScriptingInterface::recursiveFileScan(QFileInfo file, QString* dirName) { /*if (!file.isDir()) { - qCDebug(scriptengine) << "Regular file logged: " + file.fileName(); return; }*/ QFileInfoList files; // FIXME quazip hasn't been built on the android toolchain #if !defined(Q_OS_ANDROID) if (file.fileName().contains(".zip")) { - qCDebug(scriptengine) << "Extracting archive: " + file.fileName(); JlCompress::extractDir(file.fileName()); } #endif @@ -167,7 +159,6 @@ void FileScriptingInterface::recursiveFileScan(QFileInfo file, QString* dirName) }*/ foreach (QFileInfo file, files) { - qCDebug(scriptengine) << "Looking into file: " + file.fileName(); recursiveFileScan(file, dirName); } return; diff --git a/libraries/script-engine/src/ScriptCache.cpp b/libraries/script-engine/src/ScriptCache.cpp index 8acf88a7ce..9922b125f4 100644 --- a/libraries/script-engine/src/ScriptCache.cpp +++ b/libraries/script-engine/src/ScriptCache.cpp @@ -37,9 +37,6 @@ ScriptCache::ScriptCache(QObject* parent) { void ScriptCache::clearCache() { Lock lock(_containerLock); - foreach(auto& url, _scriptCache.keys()) { - qCDebug(scriptengine) << "clearing cache: " << url; - } _scriptCache.clear(); } @@ -48,7 +45,6 @@ void ScriptCache::clearATPScriptsFromCache() { qCDebug(scriptengine) << "Clearing ATP scripts from ScriptCache"; for (auto it = _scriptCache.begin(); it != _scriptCache.end();) { if (it.key().scheme() == "atp") { - qCDebug(scriptengine) << "Removing: " << it.key(); it = _scriptCache.erase(it); } else { ++it; @@ -60,7 +56,6 @@ void ScriptCache::deleteScript(const QUrl& unnormalizedURL) { QUrl url = DependencyManager::get()->normalizeURL(unnormalizedURL); Lock lock(_containerLock); if (_scriptCache.contains(url)) { - qCDebug(scriptengine) << "Delete script from cache:" << url.toString(); _scriptCache.remove(url); } } @@ -146,7 +141,6 @@ void ScriptCache::scriptContentAvailable(int maxRetries) { _activeScriptRequests.remove(url); _scriptCache[url] = scriptContent = req->getData(); - qCDebug(scriptengine) << "Done downloading script at:" << url.toString(); } else { auto result = req->getResult(); bool irrecoverable = @@ -160,12 +154,12 @@ void ScriptCache::scriptContentAvailable(int maxRetries) { int timeout = exp(scriptRequest.numRetries) * ScriptRequest::START_DELAY_BETWEEN_RETRIES; int attempt = scriptRequest.numRetries; - qCDebug(scriptengine) << QString("Script request failed [%1]: %2 (will retry %3 more times; attempt #%4 in %5ms...)") - .arg(status).arg(url.toString()).arg(maxRetries - attempt + 1).arg(attempt).arg(timeout); + qCDebug(scriptengine) << QString("Script request failed [%1]: (will retry %2 more times; attempt #%3 in %4ms...)") + .arg(status).arg(maxRetries - attempt + 1).arg(attempt).arg(timeout); QTimer::singleShot(timeout, this, [this, url, attempt, maxRetries]() { - qCDebug(scriptengine) << QString("Retrying script request [%1 / %2]: %3") - .arg(attempt).arg(maxRetries).arg(url.toString()); + qCDebug(scriptengine) << QString("Retrying script request [%1 / %2]") + .arg(attempt).arg(maxRetries); auto request = DependencyManager::get()->createResourceRequest( nullptr, url, true, -1, "ScriptCache::scriptContentAvailable"); @@ -186,12 +180,10 @@ void ScriptCache::scriptContentAvailable(int maxRetries) { scriptContent = _scriptCache[url]; } _activeScriptRequests.remove(url); - qCWarning(scriptengine) << "Error loading script from URL " << url << "(" << status <<")"; + qCWarning(scriptengine) << "Error loading script from URL (" << status <<")"; } } - } else { - qCWarning(scriptengine) << "Warning: scriptContentAvailable for inactive url: " << url; } } diff --git a/libraries/script-engine/src/ScriptEngine.cpp b/libraries/script-engine/src/ScriptEngine.cpp index be1a9c20ef..14e8f45da9 100644 --- a/libraries/script-engine/src/ScriptEngine.cpp +++ b/libraries/script-engine/src/ScriptEngine.cpp @@ -369,7 +369,6 @@ void ScriptEngine::runInThread() { Q_ASSERT_X(!_isThreaded, "ScriptEngine::runInThread()", "runInThread should not be called more than once"); if (_isThreaded) { - qCWarning(scriptengine) << "ScriptEngine already running in thread: " << getFilename(); return; } @@ -419,10 +418,10 @@ void ScriptEngine::waitTillDoneRunning() { workerThread->quit(); if (isEvaluating()) { - qCWarning(scriptengine) << "Script Engine has been running too long, aborting:" << getFilename(); + qCWarning(scriptengine) << "Script Engine has been running too long, aborting."; abortEvaluation(); } else { - qCWarning(scriptengine) << "Script Engine has been running too long, throwing:" << getFilename(); + qCWarning(scriptengine) << "Script Engine has been running too long, throwing."; auto context = currentContext(); if (context) { context->throwError("Timed out during shutdown"); @@ -498,7 +497,6 @@ void ScriptEngine::loadURL(const QUrl& scriptURL, bool reload) { { static const QString DEBUG_FLAG("#debug"); if (QRegularExpression(DEBUG_FLAG).match(scriptContents).hasMatch()) { - qCWarning(scriptengine) << "NOTE: ScriptEngine for " << QUrl(url).fileName() << " will be launched in debug mode"; _debuggable = true; } } @@ -1632,7 +1630,6 @@ QVariantMap ScriptEngine::fetchModuleSource(const QString& modulePath, const boo auto url = modulePath; auto status = _status[url]; auto contents = data[url]; - qCDebug(scriptengine_module) << "require.fetchModuleSource.onload: " << QUrl(url).fileName() << status << QThread::currentThread(); if (isStopping()) { req["status"] = "Stopped"; req["success"] = false; @@ -1752,8 +1749,8 @@ QScriptValue ScriptEngine::require(const QString& moduleId) { auto exports = module.property("exports"); if (!invalidateCache && exports.isObject()) { // we have found a cached module -- just need to possibly register it with current parent - qCDebug(scriptengine_module) << QString("require - using cached module '%1' for '%2' (loaded: %3)") - .arg(modulePath).arg(moduleId).arg(module.property("loaded").toString()); + qCDebug(scriptengine_module) << QString("require - using cached module for '%1' (loaded: %2)") + .arg(moduleId).arg(module.property("loaded").toString()); registerModuleWithParent(module, parent); maybeEmitUncaughtException("cached module"); return exports; @@ -2138,7 +2135,7 @@ void ScriptEngine::loadEntityScript(const EntityItemID& entityID, const QString& PROFILE_RANGE(script, __FUNCTION__); if (isStopping() || DependencyManager::get()->isStopped()) { - qCDebug(scriptengine) << "loadEntityScript.start " << entityScript << entityID.toString() + qCDebug(scriptengine) << "loadEntityScript.start " << entityID.toString() << " but isStopping==" << isStopping() << " || engines->isStopped==" << DependencyManager::get()->isStopped(); return; @@ -2163,8 +2160,8 @@ void ScriptEngine::loadEntityScript(const EntityItemID& entityID, const QString& // since not reloading, assume that the exact same input would produce the exact same output again // note: this state gets reset with "reload all scripts," leaving/returning to a Domain, clear cache, etc. #ifdef DEBUG_ENTITY_STATES - qCDebug(scriptengine) << QString("loadEntityScript.cancelled entity: %1 script: %2 (previous script failure)") - .arg(entityID.toString()).arg(entityScript); + qCDebug(scriptengine) << QString("loadEntityScript.cancelled entity: %1 (previous script failure)") + .arg(entityID.toString()); #endif updateEntityScriptStatus(entityID, EntityScriptStatus::ERROR_LOADING_SCRIPT, "A previous Entity failed to load using this script URL; reload to try again."); @@ -2173,8 +2170,8 @@ void ScriptEngine::loadEntityScript(const EntityItemID& entityID, const QString& } else { // another entity is busy loading from this script URL so wait for them to finish #ifdef DEBUG_ENTITY_STATES - qCDebug(scriptengine) << QString("loadEntityScript.deferring[%0] entity: %1 script: %2 (waiting on %3)") - .arg(_deferredEntityLoads.size()).arg(entityID.toString()).arg(entityScript).arg(currentEntityID.toString()); + qCDebug(scriptengine) << QString("loadEntityScript.deferring[%0] entity: %1 (waiting on %2 )") + .arg(_deferredEntityLoads.size()).arg(entityID.toString()).arg(currentEntityID.toString()); #endif _deferredEntityLoads.push_back({ entityID, entityScript }); return; @@ -2188,7 +2185,7 @@ void ScriptEngine::loadEntityScript(const EntityItemID& entityID, const QString& { EntityScriptDetails details; bool hasEntityScript = getEntityScriptDetails(entityID, details); - qCDebug(scriptengine) << "loadEntityScript.LOADING: " << entityScript << entityID.toString() + qCDebug(scriptengine) << "loadEntityScript.LOADING: " << entityID.toString() << "(previous: " << (hasEntityScript ? details.status : EntityScriptStatus::PENDING) << ")"; } #endif @@ -2217,7 +2214,7 @@ void ScriptEngine::loadEntityScript(const EntityItemID& entityID, const QString& } executeOnScriptThread([=]{ #ifdef DEBUG_ENTITY_STATES - qCDebug(scriptengine) << "loadEntityScript.contentAvailable" << status << QUrl(url).fileName() << entityID.toString(); + qCDebug(scriptengine) << "loadEntityScript.contentAvailable" << status << entityID.toString(); #endif if (!isStopping() && hasEntityScriptDetails(entityID)) { _contentAvailableQueue[entityID] = { entityID, url, contents, isURL, success, status }; @@ -2306,7 +2303,7 @@ void ScriptEngine::entityScriptContentAvailable(const EntityItemID& entityID, co setEntityScriptDetails(entityID, newDetails); #ifdef DEBUG_ENTITY_STATES - qCDebug(scriptengine) << "entityScriptContentAvailable -- flagging " << entityScript << " as BAD_SCRIPT_UUID_PLACEHOLDER"; + qCDebug(scriptengine) << "entityScriptContentAvailable -- flagging as BAD_SCRIPT_UUID_PLACEHOLDER"; #endif // flag the original entityScript as unusuable _occupiedScriptURLs[entityScript] = BAD_SCRIPT_UUID_PLACEHOLDER; @@ -2352,7 +2349,7 @@ void ScriptEngine::entityScriptContentAvailable(const EntityItemID& entityID, co timeout.setSingleShot(true); timeout.start(SANDBOX_TIMEOUT); connect(&timeout, &QTimer::timeout, [=, &sandbox]{ - qCDebug(scriptengine) << "ScriptEngine::entityScriptContentAvailable timeout(" << scriptOrURL << ")"; + qCDebug(scriptengine) << "ScriptEngine::entityScriptContentAvailable timeout"; // Guard against infinite loops and non-performant code sandbox.raiseException( diff --git a/libraries/script-engine/src/ScriptEngines.cpp b/libraries/script-engine/src/ScriptEngines.cpp index 6393ff33ea..2cdfc20647 100644 --- a/libraries/script-engine/src/ScriptEngines.cpp +++ b/libraries/script-engine/src/ScriptEngines.cpp @@ -112,7 +112,7 @@ QUrl expandScriptUrl(const QUrl& rawScriptURL) { QUrl defaultScriptsLoc = PathUtils::defaultScriptsLocation(); if (!defaultScriptsLoc.isParentOf(url)) { - qCWarning(scriptengine) << "Script.include() ignoring file path" << rawScriptURL + qCWarning(scriptengine) << "Script.include() ignoring file path" << "-- outside of standard libraries: " << url.path() << defaultScriptsLoc.path(); @@ -393,7 +393,6 @@ void ScriptEngines::stopAllScripts(bool restart) { } // stop all scripts - qCDebug(scriptengine) << "stopping script..." << it.key(); scriptEngine->stop(); removeScriptEngine(scriptEngine); } @@ -403,11 +402,8 @@ void ScriptEngines::stopAllScripts(bool restart) { for(const auto &scriptName : toReload) { auto scriptEngine = getScriptEngine(scriptName); if (scriptEngine && !scriptEngine->isFinished()) { - qCDebug(scriptengine) << "waiting on script:" << scriptName; scriptEngine->waitTillDoneRunning(); - qCDebug(scriptengine) << "done waiting on script:" << scriptName; } - qCDebug(scriptengine) << "reloading script..." << scriptName; reloadScript(scriptName); } if (restart) { @@ -445,7 +441,6 @@ bool ScriptEngines::stopScript(const QString& rawScriptURL, bool restart) { scriptEngine->stop(); removeScriptEngine(scriptEngine); stoppedScript = true; - qCDebug(scriptengine) << "stopping script..." << scriptURL; } } return stoppedScript;