feat: Erfolgs-Protokollierung für die gesamte Sync-Kette
SyncEventPublisher/SyncEngine/EventApplier protokollierten bisher ausschließlich Fehlschläge - ein sauberes Log bewies nur "nichts ist abgestürzt", nicht ob eine Änderung tatsächlich hoch-/heruntergeladen wurde. Jetzt wird auch der Erfolgspfad geloggt: Einreihen in die Outbox (mit SequenceNr), Push/Pull mit Anzahl und Entitätstypen sowie der vom Server bestätigten ServerSequenceNr, und jedes tatsächlich angewendete Ereignis. Damit lässt sich anhand der Log-Dateien beider Geräte nachvollziehen, an welcher Stelle der Kette eine Änderung verloren geht. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -42,6 +42,7 @@ public class EventApplier(LiteDbContext db, byte[] syncKey, HttpClient? http = n
|
||||
handler(db, evt.Operation, evt.EntityId, json);
|
||||
if (evt.EntityType == nameof(Documentation) && evt.Operation != "Delete" && http is not null)
|
||||
await DownloadMissingAttachmentsAsync(json);
|
||||
logger?.Info($"Sync: Ereignis angewendet - {evt.EntityType} {evt.Operation} EntityId={evt.EntityId}");
|
||||
}
|
||||
catch (LiteException ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user