From 692ccfc09b9051abbac8ff4f72d98a05fc7e18d0 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Wed, 4 Apr 2018 09:49:15 -0700 Subject: [PATCH] Create HIFI_FCDEBUG(_ID) variants that require a category Original macros use default settings. --- domain-server/src/DomainServer.cpp | 6 +++--- interface/src/Application.cpp | 2 +- interface/src/InterfaceDynamicFactory.cpp | 2 +- libraries/audio/src/AudioRingBuffer.cpp | 8 ++++---- libraries/audio/src/PositionalAudioStream.cpp | 2 +- libraries/entities/src/EntityItem.cpp | 2 +- libraries/entities/src/EntityTree.cpp | 2 +- libraries/fbx/src/FBXReader_Mesh.cpp | 4 ++-- libraries/networking/src/LimitedNodeList.cpp | 4 ++-- libraries/networking/src/SequenceNumberStats.cpp | 4 ++-- libraries/networking/src/udt/Packet.cpp | 2 +- libraries/networking/src/udt/SendQueue.cpp | 2 +- libraries/networking/src/udt/Socket.cpp | 4 ++-- libraries/octree/src/Octree.cpp | 12 ++++++------ libraries/octree/src/OctreeElement.cpp | 2 +- libraries/octree/src/OctreeSceneStats.cpp | 2 +- libraries/physics/src/ObjectConstraintBallSocket.cpp | 4 ++-- libraries/physics/src/ObjectConstraintConeTwist.cpp | 4 ++-- libraries/physics/src/ObjectConstraintHinge.cpp | 4 ++-- libraries/physics/src/ObjectConstraintSlider.cpp | 4 ++-- libraries/render/src/render/DrawTask.cpp | 4 ++-- libraries/shared/src/LogHandler.h | 10 +++++++--- 22 files changed, 47 insertions(+), 43 deletions(-) diff --git a/domain-server/src/DomainServer.cpp b/domain-server/src/DomainServer.cpp index 0965ef7bca..b1f996c9b2 100644 --- a/domain-server/src/DomainServer.cpp +++ b/domain-server/src/DomainServer.cpp @@ -611,13 +611,13 @@ bool DomainServer::isPacketVerified(const udt::Packet& packet) { // let the NodeList do its checks now (but pass it the sourceNode so it doesn't need to look it up again) return nodeList->isPacketVerifiedWithSource(packet, sourceNode.data()); } else { - HIFI_FDEBUG((*QLoggingCategory::defaultCategory()), "Packet of type" << headerType + HIFI_FDEBUG("Packet of type" << headerType << "received from unmatched IP for UUID" << uuidStringWithoutCurlyBraces(sourceID)); return false; } } else { - HIFI_FDEBUG((*QLoggingCategory::defaultCategory()), "Packet of type" << headerType + HIFI_FDEBUG("Packet of type" << headerType << "received from unknown node with UUID" << uuidStringWithoutCurlyBraces(sourceID)); return false; @@ -1268,7 +1268,7 @@ void DomainServer::processRequestAssignmentPacket(QSharedPointershouldBePhysical() && !entity->isReadyToComputeShape()) { - HIFI_FDEBUG(interfaceapp(), "Physics disabled until entity loads: " << entity->getID() << entity->getName()); + HIFI_FCDEBUG(interfaceapp(), "Physics disabled until entity loads: " << entity->getID() << entity->getName()); // don't break here because we want all the relevant entities to start their downloads result = false; } diff --git a/interface/src/InterfaceDynamicFactory.cpp b/interface/src/InterfaceDynamicFactory.cpp index dc8a789d32..b7861b56c8 100644 --- a/interface/src/InterfaceDynamicFactory.cpp +++ b/interface/src/InterfaceDynamicFactory.cpp @@ -87,7 +87,7 @@ EntityDynamicPointer InterfaceDynamicFactory::factoryBA(EntityItemPointer ownerE if (dynamic) { dynamic->deserialize(data); if (dynamic->lifetimeIsOver()) { - HIFI_FDEBUG((*QLoggingCategory::defaultCategory()), "InterfaceDynamicFactory::factoryBA lifetimeIsOver during dynamic creation --" + HIFI_FDEBUG("InterfaceDynamicFactory::factoryBA lifetimeIsOver during dynamic creation --" << dynamic->getExpires() << "<" << usecTimestampNow()); return nullptr; } diff --git a/libraries/audio/src/AudioRingBuffer.cpp b/libraries/audio/src/AudioRingBuffer.cpp index ded390a4db..7b1f24e519 100644 --- a/libraries/audio/src/AudioRingBuffer.cpp +++ b/libraries/audio/src/AudioRingBuffer.cpp @@ -164,7 +164,7 @@ int AudioRingBufferTemplate::writeData(const char* data, int maxSize) { _nextOutput = shiftedPositionAccomodatingWrap(_nextOutput, samplesToDelete); _overflowCount++; - HIFI_FDEBUG(audio(), RING_BUFFER_OVERFLOW_DEBUG); + HIFI_FCDEBUG(audio(), RING_BUFFER_OVERFLOW_DEBUG); qPrintable(RING_BUFFER_OVERFLOW_DEBUG); } @@ -222,7 +222,7 @@ int AudioRingBufferTemplate::addSilentSamples(int silentSamples) { if (numWriteSamples > samplesRoomFor) { numWriteSamples = samplesRoomFor; - HIFI_FDEBUG(audio(), DROPPED_SILENT_DEBUG); + HIFI_FCDEBUG(audio(), DROPPED_SILENT_DEBUG); } if (_endOfLastWrite + numWriteSamples > _buffer + _bufferLength) { @@ -273,7 +273,7 @@ int AudioRingBufferTemplate::writeSamples(ConstIterator source, int maxSample int samplesToDelete = samplesToCopy - samplesRoomFor; _nextOutput = shiftedPositionAccomodatingWrap(_nextOutput, samplesToDelete); _overflowCount++; - HIFI_FDEBUG(audio(), RING_BUFFER_OVERFLOW_DEBUG); + HIFI_FCDEBUG(audio(), RING_BUFFER_OVERFLOW_DEBUG); } Sample* bufferLast = _buffer + _bufferLength - 1; @@ -295,7 +295,7 @@ int AudioRingBufferTemplate::writeSamplesWithFade(ConstIterator source, int m int samplesToDelete = samplesToCopy - samplesRoomFor; _nextOutput = shiftedPositionAccomodatingWrap(_nextOutput, samplesToDelete); _overflowCount++; - HIFI_FDEBUG(audio(), RING_BUFFER_OVERFLOW_DEBUG); + HIFI_FCDEBUG(audio(), RING_BUFFER_OVERFLOW_DEBUG); } Sample* bufferLast = _buffer + _bufferLength - 1; diff --git a/libraries/audio/src/PositionalAudioStream.cpp b/libraries/audio/src/PositionalAudioStream.cpp index f006f370c8..a6bbc71a65 100644 --- a/libraries/audio/src/PositionalAudioStream.cpp +++ b/libraries/audio/src/PositionalAudioStream.cpp @@ -81,7 +81,7 @@ int PositionalAudioStream::parsePositionalData(const QByteArray& positionalByteA // if the client sends us a bad position, flag it so that we don't consider this stream for mixing if (glm::isnan(_position.x) || glm::isnan(_position.y) || glm::isnan(_position.z)) { - HIFI_FDEBUG((*QLoggingCategory::defaultCategory()), "PositionalAudioStream unpacked invalid position for node" << uuidStringWithoutCurlyBraces(getNodeID()) ); + HIFI_FDEBUG("PositionalAudioStream unpacked invalid position for node" << uuidStringWithoutCurlyBraces(getNodeID()) ); _hasValidPosition = false; } else { diff --git a/libraries/entities/src/EntityItem.cpp b/libraries/entities/src/EntityItem.cpp index 22341298c8..813be9dace 100644 --- a/libraries/entities/src/EntityItem.cpp +++ b/libraries/entities/src/EntityItem.cpp @@ -2197,7 +2197,7 @@ void EntityItem::deserializeActionsInternal() { entity->addActionInternal(simulation, action); updated << actionID; } else { - HIFI_FDEBUG(entities(), "EntityItem::deserializeActionsInternal -- action creation failed for" + HIFI_FCDEBUG(entities(), "EntityItem::deserializeActionsInternal -- action creation failed for" << getID() << _name); // getName(); removeActionInternal(actionID, nullptr); } diff --git a/libraries/entities/src/EntityTree.cpp b/libraries/entities/src/EntityTree.cpp index a8be7e89e9..8f158edecd 100644 --- a/libraries/entities/src/EntityTree.cpp +++ b/libraries/entities/src/EntityTree.cpp @@ -1630,7 +1630,7 @@ int EntityTree::processEditPacketData(ReceivedMessage& message, const unsigned c _recentlyDeletedEntityItemIDs.insert(usecTimestampNow(), entityItemID); } } else { - HIFI_FDEBUG(entities(), "Edit failed. [" << message.getType() <<"] " << + HIFI_FCDEBUG(entities(), "Edit failed. [" << message.getType() <<"] " << "entity id:" << entityItemID << "existingEntity pointer:" << existingEntity.get()); } diff --git a/libraries/fbx/src/FBXReader_Mesh.cpp b/libraries/fbx/src/FBXReader_Mesh.cpp index a71f467b94..2cb9d3ed9f 100644 --- a/libraries/fbx/src/FBXReader_Mesh.cpp +++ b/libraries/fbx/src/FBXReader_Mesh.cpp @@ -572,12 +572,12 @@ void FBXReader::buildModelMesh(FBXMesh& extractedMesh, const QString& url) { } if (!totalSourceIndices) { - HIFI_FDEBUG(modelformat(), "buildModelMesh failed -- no indices, url = " << url); + HIFI_FCDEBUG(modelformat(), "buildModelMesh failed -- no indices, url = " << url); return; } if (extractedMesh.vertices.size() == 0) { - HIFI_FDEBUG(modelformat(), "buildModelMesh failed -- no vertices, url = " << url); + HIFI_FCDEBUG(modelformat(), "buildModelMesh failed -- no vertices, url = " << url); return; } diff --git a/libraries/networking/src/LimitedNodeList.cpp b/libraries/networking/src/LimitedNodeList.cpp index 685e775688..fa934b5539 100644 --- a/libraries/networking/src/LimitedNodeList.cpp +++ b/libraries/networking/src/LimitedNodeList.cpp @@ -277,7 +277,7 @@ bool LimitedNodeList::packetSourceAndHashMatchAndTrackBandwidth(const udt::Packe emit dataReceived(sendingNodeType, packet.getPayloadSize()); return true; } else { - HIFI_FDEBUG(networking(), "Replicated packet of type" << headerType + HIFI_FCDEBUG(networking(), "Replicated packet of type" << headerType << "received from unknown upstream" << packet.getSenderSockAddr()); return false; @@ -340,7 +340,7 @@ bool LimitedNodeList::packetSourceAndHashMatchAndTrackBandwidth(const udt::Packe return true; } else { - HIFI_FDEBUG(networking(), + HIFI_FCDEBUG(networking(), "Packet of type" << headerType << "received from unknown node with UUID" << uuidStringWithoutCurlyBraces(sourceID)); } } diff --git a/libraries/networking/src/SequenceNumberStats.cpp b/libraries/networking/src/SequenceNumberStats.cpp index 49d555f2eb..7f1ee39554 100644 --- a/libraries/networking/src/SequenceNumberStats.cpp +++ b/libraries/networking/src/SequenceNumberStats.cpp @@ -89,7 +89,7 @@ SequenceNumberStats::ArrivalInfo SequenceNumberStats::sequenceNumberReceived(qui } else if (absGap > MAX_REASONABLE_SEQUENCE_GAP) { arrivalInfo._status = Unreasonable; - HIFI_FDEBUG(networking(), "unreasonable sequence number:" << incoming << "previous:" << _lastReceivedSequence); + HIFI_FCDEBUG(networking(), "unreasonable sequence number:" << incoming << "previous:" << _lastReceivedSequence); _stats._unreasonable++; @@ -151,7 +151,7 @@ SequenceNumberStats::ArrivalInfo SequenceNumberStats::sequenceNumberReceived(qui arrivalInfo._status = Unreasonable; - HIFI_FDEBUG(networking(), "unreasonable sequence number:" << incoming << "(possible duplicate)"); + HIFI_FCDEBUG(networking(), "unreasonable sequence number:" << incoming << "(possible duplicate)"); _stats._unreasonable++; diff --git a/libraries/networking/src/udt/Packet.cpp b/libraries/networking/src/udt/Packet.cpp index 942c676fe3..0456fa1223 100644 --- a/libraries/networking/src/udt/Packet.cpp +++ b/libraries/networking/src/udt/Packet.cpp @@ -107,7 +107,7 @@ Packet::Packet(std::unique_ptr data, qint64 size, const HifiSockAddr& se QString::number(getMessagePartNumber())); } - HIFI_FDEBUG(networking(), debugString); + HIFI_FCDEBUG(networking(), debugString); #endif obfuscate(NoObfuscation); // Undo obfuscation diff --git a/libraries/networking/src/udt/SendQueue.cpp b/libraries/networking/src/udt/SendQueue.cpp index e437104495..0df54d539d 100644 --- a/libraries/networking/src/udt/SendQueue.cpp +++ b/libraries/networking/src/udt/SendQueue.cpp @@ -479,7 +479,7 @@ bool SendQueue::maybeResendPacket() { debugString = debugString.arg(QString::number(resendPacket.getMessageNumber()), QString::number(resendPacket.getMessagePartNumber())); } - HIFI_FDEBUG((*QLoggingCategory::defaultCategory()), debugString); + HIFI_FDEBUG(debugString); #endif // Create copy of the packet diff --git a/libraries/networking/src/udt/Socket.cpp b/libraries/networking/src/udt/Socket.cpp index e29aab0a64..4d4303698b 100644 --- a/libraries/networking/src/udt/Socket.cpp +++ b/libraries/networking/src/udt/Socket.cpp @@ -229,7 +229,7 @@ qint64 Socket::writeDatagram(const QByteArray& datagram, const HifiSockAddr& soc if (bytesWritten < 0) { // when saturating a link this isn't an uncommon message - suppress it so it doesn't bomb the debug - HIFI_FDEBUG(networking(), "Socket::writeDatagram" << _udpSocket.error() << "-" << qPrintable(_udpSocket.errorString()) ); + HIFI_FCDEBUG(networking(), "Socket::writeDatagram" << _udpSocket.error() << "-" << qPrintable(_udpSocket.errorString()) ); } return bytesWritten; @@ -513,7 +513,7 @@ std::vector Socket::getConnectionSockAddrs() { } void Socket::handleSocketError(QAbstractSocket::SocketError socketError) { - HIFI_FDEBUG(networking(), "udt::Socket error - " << socketError << _udpSocket.errorString()); + HIFI_FCDEBUG(networking(), "udt::Socket error - " << socketError << _udpSocket.errorString()); } void Socket::handleStateChanged(QAbstractSocket::SocketState socketState) { diff --git a/libraries/octree/src/Octree.cpp b/libraries/octree/src/Octree.cpp index f2fb984da1..e34ba34c8f 100644 --- a/libraries/octree/src/Octree.cpp +++ b/libraries/octree/src/Octree.cpp @@ -121,7 +121,7 @@ void Octree::recurseTreeWithPostOperation(const RecurseOctreeOperation& operatio void Octree::recurseElementWithOperation(const OctreeElementPointer& element, const RecurseOctreeOperation& operation, void* extraData, int recursionCount) { if (recursionCount > DANGEROUSLY_DEEP_RECURSION) { - HIFI_FDEBUG(octree(), "Octree::recurseElementWithOperation() reached DANGEROUSLY_DEEP_RECURSION, bailing!"); + HIFI_FCDEBUG(octree(), "Octree::recurseElementWithOperation() reached DANGEROUSLY_DEEP_RECURSION, bailing!"); return; } @@ -139,7 +139,7 @@ void Octree::recurseElementWithOperation(const OctreeElementPointer& element, co void Octree::recurseElementWithPostOperation(const OctreeElementPointer& element, const RecurseOctreeOperation& operation, void* extraData, int recursionCount) { if (recursionCount > DANGEROUSLY_DEEP_RECURSION) { - HIFI_FDEBUG(octree(), "Octree::recurseElementWithPostOperation() reached DANGEROUSLY_DEEP_RECURSION, bailing!"); + HIFI_FCDEBUG(octree(), "Octree::recurseElementWithPostOperation() reached DANGEROUSLY_DEEP_RECURSION, bailing!"); return; } @@ -165,7 +165,7 @@ void Octree::recurseElementWithOperationDistanceSorted(const OctreeElementPointe const glm::vec3& point, void* extraData, int recursionCount) { if (recursionCount > DANGEROUSLY_DEEP_RECURSION) { - HIFI_FDEBUG(octree(), "Octree::recurseElementWithOperationDistanceSorted() reached DANGEROUSLY_DEEP_RECURSION, bailing!"); + HIFI_FCDEBUG(octree(), "Octree::recurseElementWithOperationDistanceSorted() reached DANGEROUSLY_DEEP_RECURSION, bailing!"); return; } @@ -203,7 +203,7 @@ void Octree::recurseTreeWithOperator(RecurseOctreeOperator* operatorObject) { bool Octree::recurseElementWithOperator(const OctreeElementPointer& element, RecurseOctreeOperator* operatorObject, int recursionCount) { if (recursionCount > DANGEROUSLY_DEEP_RECURSION) { - HIFI_FDEBUG(octree(), "Octree::recurseElementWithOperator() reached DANGEROUSLY_DEEP_RECURSION, bailing!"); + HIFI_FCDEBUG(octree(), "Octree::recurseElementWithOperator() reached DANGEROUSLY_DEEP_RECURSION, bailing!"); return false; } @@ -269,7 +269,7 @@ OctreeElementPointer Octree::createMissingElement(const OctreeElementPointer& la const unsigned char* codeToReach, int recursionCount) { if (recursionCount > DANGEROUSLY_DEEP_RECURSION) { - HIFI_FDEBUG(octree(), "Octree::createMissingElement() reached DANGEROUSLY_DEEP_RECURSION, bailing!"); + HIFI_FCDEBUG(octree(), "Octree::createMissingElement() reached DANGEROUSLY_DEEP_RECURSION, bailing!"); return lastParentElement; } int indexOfNewChild = branchIndexWithDescendant(lastParentElement->getOctalCode(), codeToReach); @@ -426,7 +426,7 @@ void Octree::readBitstreamToTree(const unsigned char * bitstream, uint64_t buffe (unsigned char *)bitstreamAt, NULL); int numberOfThreeBitSectionsInStream = numberOfThreeBitSectionsInCode(bitstreamAt, bufferSizeBytes); if (numberOfThreeBitSectionsInStream > UNREASONABLY_DEEP_RECURSION) { - HIFI_FDEBUG(octree(), "UNEXPECTED: parsing of the octal code would make UNREASONABLY_DEEP_RECURSION... " + HIFI_FCDEBUG(octree(), "UNEXPECTED: parsing of the octal code would make UNREASONABLY_DEEP_RECURSION... " "numberOfThreeBitSectionsInStream:" << numberOfThreeBitSectionsInStream << "This buffer is corrupt. Returning."); return; diff --git a/libraries/octree/src/OctreeElement.cpp b/libraries/octree/src/OctreeElement.cpp index 18226f0ffb..ef45e8b7ba 100644 --- a/libraries/octree/src/OctreeElement.cpp +++ b/libraries/octree/src/OctreeElement.cpp @@ -401,7 +401,7 @@ OctreeElementPointer OctreeElement::addChildAtIndex(int childIndex) { bool OctreeElement::safeDeepDeleteChildAtIndex(int childIndex, int recursionCount) { bool deleteApproved = false; if (recursionCount > DANGEROUSLY_DEEP_RECURSION) { - HIFI_FDEBUG(octree(), "OctreeElement::safeDeepDeleteChildAtIndex() reached DANGEROUSLY_DEEP_RECURSION, bailing!"); + HIFI_FCDEBUG(octree(), "OctreeElement::safeDeepDeleteChildAtIndex() reached DANGEROUSLY_DEEP_RECURSION, bailing!"); return deleteApproved; } OctreeElementPointer childToDelete = getChildAtIndex(childIndex); diff --git a/libraries/octree/src/OctreeSceneStats.cpp b/libraries/octree/src/OctreeSceneStats.cpp index 3253a4dc07..117f3e0385 100644 --- a/libraries/octree/src/OctreeSceneStats.cpp +++ b/libraries/octree/src/OctreeSceneStats.cpp @@ -636,7 +636,7 @@ void OctreeSceneStats::trackIncomingOctreePacket(ReceivedMessage& message, bool const qint64 MAX_RESONABLE_FLIGHT_TIME = 200 * USECS_PER_SECOND; // 200 seconds is more than enough time for a packet to arrive const qint64 MIN_RESONABLE_FLIGHT_TIME = -1 * (qint64)USECS_PER_SECOND; // more than 1 second of "reverse flight time" would be unreasonable if (flightTime > MAX_RESONABLE_FLIGHT_TIME || flightTime < MIN_RESONABLE_FLIGHT_TIME) { - HIFI_FDEBUG(octree(), "ignoring unreasonable packet... flightTime:" << flightTime + HIFI_FCDEBUG(octree(), "ignoring unreasonable packet... flightTime:" << flightTime << "nodeClockSkewUsec:" << nodeClockSkewUsec << "usecs"); return; // ignore any packets that are unreasonable } diff --git a/libraries/physics/src/ObjectConstraintBallSocket.cpp b/libraries/physics/src/ObjectConstraintBallSocket.cpp index 4a9ef0f1ac..1f1cb2487d 100644 --- a/libraries/physics/src/ObjectConstraintBallSocket.cpp +++ b/libraries/physics/src/ObjectConstraintBallSocket.cpp @@ -87,7 +87,7 @@ btTypedConstraint* ObjectConstraintBallSocket::getConstraint() { btRigidBody* rigidBodyA = getRigidBody(); if (!rigidBodyA) { - HIFI_FDEBUG(physics(), "ObjectConstraintBallSocket::getConstraint -- no rigidBodyA"); + HIFI_FCDEBUG(physics(), "ObjectConstraintBallSocket::getConstraint -- no rigidBodyA"); return nullptr; } @@ -96,7 +96,7 @@ btTypedConstraint* ObjectConstraintBallSocket::getConstraint() { btRigidBody* rigidBodyB = getOtherRigidBody(otherEntityID); if (!rigidBodyB) { - HIFI_FDEBUG(physics(), "ObjectConstraintBallSocket::getConstraint -- no rigidBodyB"); + HIFI_FCDEBUG(physics(), "ObjectConstraintBallSocket::getConstraint -- no rigidBodyB"); return nullptr; } diff --git a/libraries/physics/src/ObjectConstraintConeTwist.cpp b/libraries/physics/src/ObjectConstraintConeTwist.cpp index 01972805d3..714fd662e1 100644 --- a/libraries/physics/src/ObjectConstraintConeTwist.cpp +++ b/libraries/physics/src/ObjectConstraintConeTwist.cpp @@ -98,7 +98,7 @@ btTypedConstraint* ObjectConstraintConeTwist::getConstraint() { btRigidBody* rigidBodyA = getRigidBody(); if (!rigidBodyA) { - HIFI_FDEBUG(physics(), "ObjectConstraintConeTwist::getConstraint -- no rigidBodyA"); + HIFI_FCDEBUG(physics(), "ObjectConstraintConeTwist::getConstraint -- no rigidBodyA"); return nullptr; } @@ -127,7 +127,7 @@ btTypedConstraint* ObjectConstraintConeTwist::getConstraint() { btRigidBody* rigidBodyB = getOtherRigidBody(otherEntityID); if (!rigidBodyB) { - HIFI_FDEBUG(physics(), "ObjectConstraintConeTwist::getConstraint -- no rigidBodyB"); + HIFI_FCDEBUG(physics(), "ObjectConstraintConeTwist::getConstraint -- no rigidBodyB"); return nullptr; } diff --git a/libraries/physics/src/ObjectConstraintHinge.cpp b/libraries/physics/src/ObjectConstraintHinge.cpp index 8fb1ca19a8..18014cddca 100644 --- a/libraries/physics/src/ObjectConstraintHinge.cpp +++ b/libraries/physics/src/ObjectConstraintHinge.cpp @@ -97,7 +97,7 @@ btTypedConstraint* ObjectConstraintHinge::getConstraint() { btRigidBody* rigidBodyA = getRigidBody(); if (!rigidBodyA) { - HIFI_FDEBUG(physics(), "ObjectConstraintHinge::getConstraint -- no rigidBodyA"); + HIFI_FCDEBUG(physics(), "ObjectConstraintHinge::getConstraint -- no rigidBodyA"); return nullptr; } @@ -112,7 +112,7 @@ btTypedConstraint* ObjectConstraintHinge::getConstraint() { // This hinge is between two entities... find the other rigid body. btRigidBody* rigidBodyB = getOtherRigidBody(otherEntityID); if (!rigidBodyB) { - HIFI_FDEBUG(physics(), "ObjectConstraintHinge::getConstraint -- no rigidBodyB"); + HIFI_FCDEBUG(physics(), "ObjectConstraintHinge::getConstraint -- no rigidBodyB"); return nullptr; } diff --git a/libraries/physics/src/ObjectConstraintSlider.cpp b/libraries/physics/src/ObjectConstraintSlider.cpp index 73ec59eb7c..9ae34e1124 100644 --- a/libraries/physics/src/ObjectConstraintSlider.cpp +++ b/libraries/physics/src/ObjectConstraintSlider.cpp @@ -89,7 +89,7 @@ btTypedConstraint* ObjectConstraintSlider::getConstraint() { btRigidBody* rigidBodyA = getRigidBody(); if (!rigidBodyA) { - HIFI_FDEBUG(physics(), "ObjectConstraintSlider::getConstraint -- no rigidBodyA"); + HIFI_FCDEBUG(physics(), "ObjectConstraintSlider::getConstraint -- no rigidBodyA"); return nullptr; } @@ -118,7 +118,7 @@ btTypedConstraint* ObjectConstraintSlider::getConstraint() { btRigidBody* rigidBodyB = getOtherRigidBody(otherEntityID); if (!rigidBodyB) { - HIFI_FDEBUG(physics(), "ObjectConstraintSlider::getConstraint -- no rigidBodyB"); + HIFI_FCDEBUG(physics(), "ObjectConstraintSlider::getConstraint -- no rigidBodyB"); return nullptr; } diff --git a/libraries/render/src/render/DrawTask.cpp b/libraries/render/src/render/DrawTask.cpp index 1d6c0edab5..18335a1296 100755 --- a/libraries/render/src/render/DrawTask.cpp +++ b/libraries/render/src/render/DrawTask.cpp @@ -55,7 +55,7 @@ void renderShape(RenderArgs* args, const ShapePlumberPointer& shapeContext, cons } else if (key.hasOwnPipeline()) { item.render(args); } else { - HIFI_FDEBUG(renderlogging(), "Item could not be rendered with invalid key" << key); + HIFI_FCDEBUG(renderlogging(), "Item could not be rendered with invalid key" << key); } args->_itemShapeKey = 0; } @@ -106,7 +106,7 @@ void render::renderStateSortShapes(const RenderContextPointer& renderContext, } else if (key.hasOwnPipeline()) { ownPipelineBucket.push_back( std::make_tuple(item, key) ); } else { - HIFI_FDEBUG(renderlogging(), "Item could not be rendered with invalid key" << key); + HIFI_FCDEBUG(renderlogging(), "Item could not be rendered with invalid key" << key); } } } diff --git a/libraries/shared/src/LogHandler.h b/libraries/shared/src/LogHandler.h index a84ce96df9..dfdfee6c3d 100644 --- a/libraries/shared/src/LogHandler.h +++ b/libraries/shared/src/LogHandler.h @@ -81,7 +81,7 @@ private: static QMutex _mutex; }; -#define HIFI_FDEBUG(category, message) \ +#define HIFI_FCDEBUG(category, message) \ do { \ if (category.isDebugEnabled()) { \ static int repeatedMessageID_ = LogHandler::getInstance().newRepeatedMessageID(); \ @@ -93,9 +93,11 @@ private: } \ } while (false) -#define HIFI_FDEBUG_ID(category, messageID, message) \ +#define HIFI_FDEBUG(message) HIFI_FCDEBUG((*QLoggingCategory::defaultCategory()), message) + +#define HIFI_FCDEBUG_ID(category, messageID, message) \ do { \ - if (category().isDebugEnabled()) { \ + if (category.isDebugEnabled()) { \ QString logString_; \ QDebug debugStringReceiver_(&logString_); \ debugStringReceiver_ << message; \ @@ -104,4 +106,6 @@ private: } \ } while (false) +#define HIFI_FDEBUG_ID(message) HIFI_FCDEBUG_ID((*QLoggingCategory::defaultCategory()), message) + #endif // hifi_LogHandler_h