You can write an JCR/Sling event listener for node add/modify and inside that you can check the condition and create event logs
AuditLogEntry auditLogEntry = new AuditLogEntry(node.EVENT_TOPIC, node.getModificationDate(), node.getUserId(), node.getPath(), "Node updated", node.getEventProperties());
...