mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 06:23:06 +02:00
make edit logging terse vs not a domain-server setting
This commit is contained in:
parent
77bb11675d
commit
9a9e5b962e
4 changed files with 25 additions and 6 deletions
|
@ -147,9 +147,13 @@ bool EntityServer::readAdditionalConfiguration(const QJsonObject& settingsSectio
|
||||||
readOptionBool(QString("wantEditLogging"), settingsSectionObject, wantEditLogging);
|
readOptionBool(QString("wantEditLogging"), settingsSectionObject, wantEditLogging);
|
||||||
qDebug("wantEditLogging=%s", debug::valueOf(wantEditLogging));
|
qDebug("wantEditLogging=%s", debug::valueOf(wantEditLogging));
|
||||||
|
|
||||||
|
bool wantTerseEditLogging = false;
|
||||||
|
readOptionBool(QString("wantTerseEditLogging"), settingsSectionObject, wantTerseEditLogging);
|
||||||
|
qDebug("wantTerseEditLogging=%s", debug::valueOf(wantTerseEditLogging));
|
||||||
|
|
||||||
EntityTreePointer tree = std::static_pointer_cast<EntityTree>(_tree);
|
EntityTreePointer tree = std::static_pointer_cast<EntityTree>(_tree);
|
||||||
tree->setWantEditLogging(wantEditLogging);
|
tree->setWantEditLogging(wantEditLogging);
|
||||||
|
tree->setWantTerseEditLogging(wantTerseEditLogging);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -484,6 +484,14 @@
|
||||||
"default": false,
|
"default": false,
|
||||||
"advanced": true
|
"advanced": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "wantTerseEditLogging",
|
||||||
|
"type": "checkbox",
|
||||||
|
"label": "Edit Logging (Terse)",
|
||||||
|
"help": "Logging of all edits to entities",
|
||||||
|
"default": false,
|
||||||
|
"advanced": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "verboseDebug",
|
"name": "verboseDebug",
|
||||||
"type": "checkbox",
|
"type": "checkbox",
|
||||||
|
|
|
@ -610,10 +610,10 @@ int EntityTree::processEditPacketData(NLPacket& packet, const unsigned char* edi
|
||||||
// if the EntityItem exists, then update it
|
// if the EntityItem exists, then update it
|
||||||
startLogging = usecTimestampNow();
|
startLogging = usecTimestampNow();
|
||||||
if (wantEditLogging()) {
|
if (wantEditLogging()) {
|
||||||
|
qCDebug(entities) << "User [" << senderNode->getUUID() << "] editing entity. ID:" << entityItemID;
|
||||||
// qCDebug(entities) << "User [" << senderNode->getUUID() << "] editing entity. ID:" << entityItemID;
|
qCDebug(entities) << " properties:" << properties;
|
||||||
// qCDebug(entities) << " properties:" << properties;
|
}
|
||||||
|
if (wantTerseEditLogging()) {
|
||||||
qCDebug(entities) << "edit" << entityItemID.toString() << properties.listChangedProperties();
|
qCDebug(entities) << "edit" << entityItemID.toString() << properties.listChangedProperties();
|
||||||
}
|
}
|
||||||
endLogging = usecTimestampNow();
|
endLogging = usecTimestampNow();
|
||||||
|
@ -641,6 +641,9 @@ int EntityTree::processEditPacketData(NLPacket& packet, const unsigned char* edi
|
||||||
<< newEntity->getEntityItemID();
|
<< newEntity->getEntityItemID();
|
||||||
qCDebug(entities) << " properties:" << properties;
|
qCDebug(entities) << " properties:" << properties;
|
||||||
}
|
}
|
||||||
|
if (wantTerseEditLogging()) {
|
||||||
|
qCDebug(entities) << "add" << entityItemID.toString() << properties.listChangedProperties();
|
||||||
|
}
|
||||||
endLogging = usecTimestampNow();
|
endLogging = usecTimestampNow();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -872,7 +875,7 @@ int EntityTree::processEraseMessage(NLPacket& packet, const SharedNodePointer& s
|
||||||
EntityItemID entityItemID(entityID);
|
EntityItemID entityItemID(entityID);
|
||||||
entityItemIDsToDelete << entityItemID;
|
entityItemIDsToDelete << entityItemID;
|
||||||
|
|
||||||
if (wantEditLogging()) {
|
if (wantEditLogging() || wantTerseEditLogging()) {
|
||||||
qCDebug(entities) << "User [" << sourceNode->getUUID() << "] deleting entity. ID:" << entityItemID;
|
qCDebug(entities) << "User [" << sourceNode->getUUID() << "] deleting entity. ID:" << entityItemID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -916,7 +919,7 @@ int EntityTree::processEraseMessageDetails(const QByteArray& dataByteArray, cons
|
||||||
EntityItemID entityItemID(entityID);
|
EntityItemID entityItemID(entityID);
|
||||||
entityItemIDsToDelete << entityItemID;
|
entityItemIDsToDelete << entityItemID;
|
||||||
|
|
||||||
if (wantEditLogging()) {
|
if (wantEditLogging() || wantTerseEditLogging()) {
|
||||||
qCDebug(entities) << "User [" << sourceNode->getUUID() << "] deleting entity. ID:" << entityItemID;
|
qCDebug(entities) << "User [" << sourceNode->getUUID() << "] deleting entity. ID:" << entityItemID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -175,6 +175,9 @@ public:
|
||||||
bool wantEditLogging() const { return _wantEditLogging; }
|
bool wantEditLogging() const { return _wantEditLogging; }
|
||||||
void setWantEditLogging(bool value) { _wantEditLogging = value; }
|
void setWantEditLogging(bool value) { _wantEditLogging = value; }
|
||||||
|
|
||||||
|
bool wantTerseEditLogging() const { return _wantTerseEditLogging; }
|
||||||
|
void setWantTerseEditLogging(bool value) { _wantTerseEditLogging = value; }
|
||||||
|
|
||||||
bool writeToMap(QVariantMap& entityDescription, OctreeElementPointer element, bool skipDefaultValues);
|
bool writeToMap(QVariantMap& entityDescription, OctreeElementPointer element, bool skipDefaultValues);
|
||||||
bool readFromMap(QVariantMap& entityDescription);
|
bool readFromMap(QVariantMap& entityDescription);
|
||||||
|
|
||||||
|
@ -240,6 +243,7 @@ private:
|
||||||
EntitySimulation* _simulation;
|
EntitySimulation* _simulation;
|
||||||
|
|
||||||
bool _wantEditLogging = false;
|
bool _wantEditLogging = false;
|
||||||
|
bool _wantTerseEditLogging = false;
|
||||||
void maybeNotifyNewCollisionSoundURL(const QString& oldCollisionSoundURL, const QString& newCollisionSoundURL);
|
void maybeNotifyNewCollisionSoundURL(const QString& oldCollisionSoundURL, const QString& newCollisionSoundURL);
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue