Initial audit logging, for review.#1006
Conversation
|
The following links are available: |
|
The following links are available:
build (macOS-latest, full) build (windows-latest, full) build (ubuntu-18.04, android) |
|
this is a threading issue: the problem in the above image is that the isProcessorRunning method is being called on an object that has been destroyed, likely triggered from a different thread. you can see in the log that a thread was stopped just before the crash |
|
Notes: I should fold the terse edit logging into this somehow as an extra option applied to this. |
|
Further notes: will not combine terse edit logging into this PR because terse may very well be useful for debugging purposes. Gotta fix the crash still. |
|
The following links are available:
build (macOS-latest, full) build (windows-latest, full) build (ubuntu-18.04, android) |
| { | ||
| "name": "auditEditLoggingInterval", | ||
| "label": "Audit Entity Edit Logging Interval", | ||
| "help": "Milliseconds between the outputting and clearing of audit logs for entity edits/adds.", |
There was a problem hiding this comment.
| "help": "Milliseconds between the outputting and clearing of audit logs for entity edits/adds.", | |
| "help": "Milliseconds between the outputting and clearing of audit logs for entity adds/edits.", |
| if (_auditLogProcessorTimer && _auditLogProcessorTimer != NULL && _auditLogProcessorTimer->isActive()) { | ||
| return true; | ||
| } else { | ||
| return false; | ||
| } |
There was a problem hiding this comment.
| if (_auditLogProcessorTimer && _auditLogProcessorTimer != NULL && _auditLogProcessorTimer->isActive()) { | |
| return true; | |
| } else { | |
| return false; | |
| } | |
| return _auditLogProcessorTimer && _auditLogProcessorTimer->isActive(); |
| QJsonObject newEntry{ { entityID, 1 } }; | ||
| auditLogEditBuffer.insert(sender, newEntry); | ||
| } | ||
| } No newline at end of file |
| entitiesAuditLogProcessor.startAuditLogProcessor(); | ||
| } | ||
|
|
||
| qDebug() << "PROCESSING" << wantAuditEditLogging() << " - " << entitiesAuditLogProcessor.isProcessorRunning(); |
There was a problem hiding this comment.
| qDebug() << "PROCESSING" << wantAuditEditLogging() << " - " << entitiesAuditLogProcessor.isProcessorRunning(); | |
| qCDebug(entities) << "PROCESSING" << wantAuditEditLogging() << "-" << entitiesAuditLogProcessor.isProcessorRunning(); |
Spaces are automatically included between items.
| entitiesAuditLogProcessor.processEditEntityPacket(senderNode->getPublicSocket().toString(), | ||
| entityItemID.toString()); |
There was a problem hiding this comment.
Indenting seems a bit arbitrary.
| entitiesAuditLogProcessor.processAddEntityPacket(senderNode->getPublicSocket().toString(), | ||
| entityItemID.toString(), | ||
| EntityTypes::getEntityTypeName(properties.getType())); |
There was a problem hiding this comment.
Indenting seems a bit arbitrary.
| #include <QLoggingCategory> | ||
|
|
||
| Q_DECLARE_LOGGING_CATEGORY(entities) | ||
| Q_DECLARE_LOGGING_CATEGORY(entities); |
There was a problem hiding this comment.
| Q_DECLARE_LOGGING_CATEGORY(entities); | |
| Q_DECLARE_LOGGING_CATEGORY(entities) |
|
|
||
| static const quint64 DELETED_ENTITIES_EXTRA_USECS_TO_CONSIDER = USECS_PER_MSEC * 50; | ||
| const float EntityTree::DEFAULT_MAX_TMP_ENTITY_LIFETIME = 60 * 60; // 1 hour | ||
| const float EntityTree::DEFAULT_AUDIT_EDIT_INTERVAL = 10000; // 10 seconds |
There was a problem hiding this comment.
| const float EntityTree::DEFAULT_AUDIT_EDIT_INTERVAL = 10000; // 10 seconds | |
| const float EntityTree::DEFAULT_AUDIT_EDIT_LOGGING_INTERVAL = 10000; // 10 seconds |
There was a problem hiding this comment.
These names are unfortunately long.
|
Hello! Is this still an issue? |

Before I break it out into its own class and all that jazz (if I should even...), I'd like to know if this is relatively performant or would be, what better ways can I do this? I also wanted to do a push of changed properties each time. However that requires looping and that adds more overhead.
Now this can be good for general times when rapid edits aren't necessary, but would like to know if this is/can be performant enough for general use running in the background too.