forked from alekseyn/iCloudStoreManager
-
Notifications
You must be signed in to change notification settings - Fork 37
/
parseLogs
executable file
·451 lines (407 loc) · 23.1 KB
/
parseLogs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
#!/usr/bin/env bash
source bashlib
unhandled=1
while getopts :vU opt; do
case "$opt" in
h) showHelp parseLogs 'Reformats verbose ubiquity log output to make it easier to understand.' 'Maarten Billemont' \
-v 'Increase output verbosity.' \
-U 'Hide warnings about unhandled ubiquity log output.' ;;
v) (( ++_logVerbosity )) ;;
U) unhandled=0 ;;
esac
done
timePattern='[[:digit:]][[:digit:]][[:digit:]][[:digit:]]-[[:digit:]][[:digit:]]-[[:digit:]][[:digit:]] [[:digit:]][[:digit:]]:[[:digit:]][[:digit:]]:[[:digit:]][[:digit:]][:.][[:digit:]][[:digit:]][[:digit:]]'
# Parse the log's lines into blocks of log statements (=logLines)
logLines=() logLine=
while read -r line; do
line=${line%$'\r'} # DOS-to-UNIX
[[ $line =~ ^$timePattern ]] && {
[[ $logLine ]] && logLines+=("${logLine%$'\n'}") logLine=
}
logLine+=$line$'\n'
done
# Evaluate the log lines.
for logLine in "${logLines[@]}"; do
trc "$logLine"
time=0
[[ $logLine =~ ^($timePattern) ]] && time=$(totime "${BASH_REMATCH[1]}")
(( time == 0 || time - lastTime > 2000 )) && printf %s "$bold$black" && hr && printf %s "$reset"
lastTime=$time
if [[ $logLine != *'CoreData: Ubiquity:'* ]]; then
[[ $logLine ]] || continue
firstLogLine=${logLine%%$'\n'*} firstLogLine=${firstLogLine#*] }
[[ ${logLine#*$firstLogLine} ]] && firstLogLine+=" [...]"
[[ $firstLogLine = 'UbiquityStoreManager: '* ]] && app=${firstLogLine%%: *} firstLogLine=${firstLogLine#*: } || app='APP'
inf -- "[$app] $firstLogLine"
elif [[ $logLine = *'CoreData: Ubiquity: <_PFUbiquityRecordsExporter'*'exporting '@(inserted|updated|deleted)' objects:'* ]]; then
# exporter localPeerID ubiquityRootLocation tempMoveTimer lastTransactionDate objects
inserted=() updated=() deleted=() object=
while read -r line; do
if [[ $line = *'exporting inserted objects'* ]]; then
mode=inserted
trc 'mode %s' "$mode"
elif [[ $line = *'exporting updated objects'* ]]; then
mode=updated
trc 'mode %s' "$mode"
elif [[ $line = *'exporting deleted objects'* ]]; then
mode=deleted
trc 'mode %s' "$mode"
elif [[ $line = '})'?(,) ]]; then
object=${object% }
eval "$(printf '%q+=(%q)' "$mode" "$object")"
trc 'mode end %s: object=%s' "$mode" "$object"
elif [[ $line =~ ^'<'.*/([^/]*/[^/]*)'> ; data: {' ]]; then
object=${BASH_REMATCH[1]}": "
trc 'object=<%s>' "$object"
else
line=${line//'"0x'+([[:alnum:]])' <x-coredata://'+([^\/])'/'/'"<'}
object+="$line "
trc 'object+=<%s>' "$line"
fi
done <<< "$logLine"
inf '[iCloud] Exporting %d changes saved to store:' "$(( ${#inserted[@]} + ${#updated[@]} + ${#deleted[@]} ))"
for object in "${inserted[@]}"; do
logColor=$green inf "+ %s" "$object"
done
for object in "${updated[@]}"; do
logColor=$blue inf "* %s" "$object"
done
for object in "${deleted[@]}"; do
logColor=$red inf "- %s" "$object"
done
elif [[ $logLine = *'CoreData: Ubiquity: <_PFUbiquityRecordsExporter: '*'Successfully wrote transaction log:'* ]]; then
# exporter localPeerID ubiquityRootLocation tempMoveTimer lastTransactionDate transactionLog transactionLogLocation transactionNumber
log=? transaction=?
while read -r line; do
if [[ $line = 'transactionLogLocation: '* ]]; then
log=${line##*/}
elif [[ $line = 'transactionNumber: '* ]]; then
transaction=${line##* }
fi
done <<< "$logLine"
inf '[iCloud] Wrote transaction %d to log: %s' "$transaction" "$log"
elif [[ $logLine = *'CoreData: Ubiquity: Got final value for relationship:'* ]]; then
# relationship value object
relationship=? value=?
{
read relationship
relationship=${relationship##*relationship: }
while read -r line; do
[[ $line = 'Object: <'* ]] && break
value+="$line "
done
[[ $value != '?' ]] && value=${value#?}
value=${value% }
} <<< "$logLine"
inf '[iCloud] Relationship %s => %s' "$relationship" "$value"
elif [[ $logLine = *'CoreData: Ubiquity: <PFUbiquityBaselineRollResponseOperation:'*'Encountered an error while trying to respond to the roll of baseline:'* ]]; then
# rollOperation:(localPeerID storeName modelVersionHash ubiquityRootLocation) baseline permanentLocation safeLocation currentLocation storeName modelVersionHash baselineArchiveLocation errorDomain errorCode localStoreKV
domain=? code=?
while read -r line; do
[[ $line = 'Error: Error Domain='* ]] && {
IFS='=' read -r _ domain code <<< "$line"
domain=${domain%% Code} code=${code%% UserInfo=*}
break
}
done <<< "$logLine"
wrn '[iCloud] Baseline roll failed: %s, %s' "$domain" "$code"
elif [[ $logLine = *'CoreData: Ubiquity: <_PFUbiquityRecordsImporter:'*'Scheduling baseline recovery operation on behalf of:'* ]]; then
# importer ubiquityRootLocation localPeerID rollOperation:(localPeerID storeName modelVersionHash ubiquityRootLocation)
wrn '[iCloud] Scheduling baseline recovery.'
elif [[ $logLine = *'CoreData: Ubiquity: <_PFUbiquityRecordsImporter:'*"Can't process log with score: "*') after log with score:'* ]]; then
# importer ubiquityRootLocation localPeerID kv kv
failScore=? causeScore=? reason=?
while read -r line; do
[[ $line = "Can't process log"* ]] && {
failScore=${line##*process log with score: <*([^:]): } failScore="<${failScore%%)*})"
causeScore=${line##*after log with score: <*([^:]): } causeScore="<${causeScore%%)*})"
read reason
break
}
done <<< "$logLine"
wrn '[iCloud] Not processing KV %s after KV %s: %s' "$failScore" "$causeScore" "$reason"
elif [[ $logLine = *'CoreData: Ubiquity: <_PFUbiquityRecordsImporter:'*'Skipping incompatible operation (<PFUbiquityKnowledgeVector:'* ]]; then
# importer ubiquityRootLocation localPeerID kv importOperation localPeerID logScore transactionLog transactionLogLocation transactionNumber
score=? log=? transaction=?
while read -r line; do
if [[ $line = 'logScore: '* ]]; then
score="<${line##*: }"
elif [[ $line = 'transactionLogLocation: '* ]]; then
log=${line##*/}
elif [[ $line = 'transactionNumber: '* ]]; then
transaction=${line##* }
fi
done <<< "$logLine"
wrn '[iCloud] Skipping KV %s, from log %s, transaction: %d' "$score" "$log" "$transaction"
elif [[ $logLine = *'CoreData: Ubiquity: Got notification that store is about to commit:'* ]]; then
# notification store saveRequest transactionType transactionNumber
transaction=?
while read -r line; do
if [[ $line = 'transactionNumber: '* ]]; then
transaction=${line##* }
fi
done <<< "$logLine"
inf '[iCloud] Store committing transaction: %d' "$transaction"
elif [[ $logLine = *'CoreData: Ubiquity: Changes applied for transaction log content, managed object context changes:'* ]]; then
# objects
inserted=() updated=() deleted=() object=
while read -r line; do
if [[ $line = 'inserted: {('* ]]; then
mode=inserted
elif [[ $line = 'updated: {('* ]]; then
mode=updated
elif [[ $line = 'deleted: {('* ]]; then
mode=deleted
elif [[ $line = '})'?(,) ]]; then
object=${object% }
eval "$(printf '%q+=(%q)' "$mode" "$object")"
elif [[ $line =~ ^'<'.*/([^/]*/[^/]*)'> ; data: {' ]]; then
object=${BASH_REMATCH[1]}": "
else
line=${line//'"0x'+([[:alnum:]])' <x-coredata://'+([^\/])'/'/'"<'}
object+="$line "
fi
done <<< "$logLine"
inf '[iCloud] Imported %d changes into store:' "$(( ${#inserted[@]} + ${#updated[@]} + ${#deleted[@]} ))"
for object in "${inserted[@]}"; do
logColor=$green inf "+ %s" "$object"
done
for object in "${updated[@]}"; do
logColor=$blue inf "* %s" "$object"
done
for object in "${deleted[@]}"; do
logColor=$red inf "- %s" "$object"
done
elif [[ $logLine = *'CoreData: Ubiquity: <_PFUbiquityRecordsImporter:'*'Skipping log because it has already been imported into the local store:'* ]]; then
# importer ubiquityRootLocation localPeerID importOperation localPeerID location
log=?
while read -r line; do
if [[ $line = *'<PFUbiquityLocation: '* ]]; then
log=${line##*/}
fi
done <<< "$logLine"
inf '[iCloud] Already imported: %s' "$log"
# Messages with no useful content.
elif [[ $logLine = *'CoreData: Ubiquity: Successfully loaded receipt: <PFUbiquityPeerReceipt:'* ]]; then
# permanentLocation safeLocation currentLocation kv
continue
elif [[ $logLine = *'CoreData: Ubiquity: Initializing stack'* ]]; then
# stack metadataEntry metadataStoreFileLocation psc store filePresenter
continue
elif [[ $logLine = *'CoreData: Ubiquity: Setting up metadataMOC for stack:'* ]]; then
# stack localPeerID ubiquityRootURL metadataContainerURL
continue
elif [[ $logLine = *'CoreData: Ubiquity: Stack Changes:'* ]]; then
# peers transactionEntry:(actingPeer globalIDStr knowledgeVectorString localIDStr storeMetadata transactionDate transactionLogFilename transactionNumber transactionTypeNum) storeMetadata:(modelVersionHashString peerStates primaryKeyRanges storeIdentifier storeOptionsBinaryPlistData storeType storeURLString transactionEntries:(x-coredata://PFUbiquityTransactionEntry) ubiquityName ubiquityRelativePath ubiquityRootURLString)
continue
elif [[ $logLine = *'CoreData: Ubiquity: About to save stack updates, metadata moc changes:'* ]]; then
# peerStates peers storeMetadata
continue
elif [[ $logLine = *'CoreData: Ubiquity: About to save stack: <_PFUbiquityStack:'* ]]; then
# stack localPeerID ubiquityRootURL metadataContainerURL
continue
elif [[ $logLine = *'CoreData: Ubiquity: Added transaction entries to cache' ]]; then
# -
continue
elif [[ $logLine = *'CoreData: Ubiquity: Path: '*' is a ubiquity root url.'* ]]; then
# path
continue
elif [[ $logLine = *'CoreData: Ubiquity: Truncated path: '*' is a ubiquity root url.'*'Matches:'* ]]; then
# path*2
continue
elif [[ $logLine = *'CoreData: Ubiquity: Exporter considering response to save:'* ]]; then
# exporter localPeerID ubiquityRootLocation tempMoveTimer lastTransactionDate store storeOptions
continue
elif [[ $logLine = *'CoreData: Ubiquity: Exporter:'*'Will respond.'* ]]; then
# exporter localPeerID ubiquityRootLocation tempMoveTimer lastTransactionDate
continue
elif [[ $logLine = *'CoreData: Ubiquity: '*'Got change notification for url:'* ]]; then
# filePresenter ubiquityRootLocation localPeerID url(*cdt|metadata.nosync|[peer]|baseline.zip|[storeName]/*|Data/[storeUUID]/*)
continue
elif [[ $logLine = *'CoreData: Ubiquity: Coordinated read finished for ubiquity root url:'* ]]; then
# url
continue
elif [[ $logLine = *'CoreData: Ubiquity: <PFUbiquityPeerReceipt:'*': Successfully wrote to file.'* ]]; then
# receipt permanentLocation safeLocation currentLocation kv
continue
elif [[ $logLine = *'CoreData: Ubiquity: Checking peer file upload:'* ]]; then
# receipt permanentLocation safeLocation currentLocation kv
continue
elif [[ $logLine = *'CoreData: Ubiquity: Successfully initialized baseline: <PFUbiquityBaseline:'* ]]; then
# baseline permanentLocation safeLocation currentLocation storeName modelVersionHash baselineArchiveLocation
continue
elif [[ $logLine = *'CoreData: Ubiquity: <PFUbiquityBaseline:'*'Successfully created staging directory:'* ]]; then
# baseline permanentLocation safeLocation currentLocation storeName modelVersionHash baselineArchiveLocation url
continue
elif [[ $logLine = *'CoreData: Ubiquity: <PFUbiquityBaseline:'*'Successfully copied store to staging directory:'* ]]; then
# baseline permanentLocation safeLocation currentLocation storeName modelVersionHash baselineArchiveLocation store-in-staging
continue
elif [[ $logLine = *'CoreData: Ubiquity: Got more than one path component for subpath: '*' of baseline staging directory:'* ]]; then
# subpath staging
continue
elif [[ $logLine = *'CoreData: Ubiquity: <PFUbiquityBaseline:'*'Successfully removed contents of staging area.'* ]]; then
# baseline permanentLocation safeLocation currentLocation storeName modelVersionHash baselineArchiveLocation
continue
elif [[ $logLine = *'CoreData: Ubiquity: Baseline exists in the cloud, will evaluate other criteria to see if a new one can be rolled.' ]]; then
# -
continue
elif [[ $logLine = *'CoreData: Ubiquity: Asked if rolling the baseline is possible, but not enough transactions have occurred. Only '*' local transactions have occurred of the required 100.' ]]; then
# transactions-since-roll
continue
elif [[ $logLine = *'CoreData: Ubiquity: Total bytes:'* ]]; then
# bytes-of-logs
continue
elif [[ $logLine = *'CoreData: Ubiquity: Store bytes: '*' at URL:'* ]]; then
# bytes-of-store url
continue
elif [[ $logLine = *'CoreData: Ubiquity: Not enough log bytes to roll:'* ]]; then
# bytes-of-logs
continue
elif [[ $logLine = *'CoreData: Ubiquity: Beginning metadata recovery for store:'* ]]; then
# store
continue
elif [[ $logLine = *'CoreData: Ubiquity: Metadata recovery for store:'*'Creating new store metadata.'* ]]; then
# medic store
continue
elif [[ $logLine = *'CoreData: Ubiquity: <PFUbiquityStoreMetadataMedic:'*'Moving on to recreating the peer ranges.'* ]]; then
# medic store metadata:(x-coredata:///PFUbiquityStoreMetadata modelVersionHashString peerStates primaryKeyRanges storeIdentifier storeOptionsBinaryPlistData storeType storeURLString transactionEntries ubiquityName ubiquityRelativePath ubiquityRootURLString)
continue
elif [[ $logLine = *'CoreData: Ubiquity: <PFUbiquityStoreMetadataMedic:'*'Finished creating new peer ranges, moving to knowledge vector, peer states, and transaction entries.'* ]]; then
# medic store
continue
elif [[ $logLine = *'CoreData: Ubiquity: <PFUbiquityStoreMetadataMedic:'*'Fetched knowledge vector:'* ]]; then
# medic store kv
continue
elif [[ $logLine = *'CoreData: Ubiquity: <PFUbiquityStoreMetadataMedic:'*'Finished.'* ]]; then
# medic store
continue
elif [[ $logLine = *'CoreData: Ubiquity: <PFUbiquitySetupAssistant:'*'Successfully recovered metadata'* ]]; then
# assistant
continue
elif [[ $logLine = *'CoreData: Ubiquity: Removing identifiers from'* ]]; then
# store
continue
elif [[ $logLine = *'CoreData: Ubiquity: <PFUbiquitySetupAssistant:'*'Successfully wrote peer receipt file:'* ]]; then
# assistant peerReceipt permanentLocation safeLocation currentLocation kv
continue
elif [[ $logLine = *'CoreData: Ubiquity: <PFUbiquitySetupAssistant:'*'Local store knowledge vector matches metadata knowledge vector.'* ]]; then
# assistant
continue
elif [[ $logLine = *'CoreData: Ubiquity: <PFUbiquitySetupAssistant:'*"Didn't get a switchboard entry back after trying to register store:"* ]]; then
# assistant store psc
continue
elif [[ $logLine = *'CoreData: Ubiquity: Starting scan of location:'* ]]; then
# location
continue
elif [[ $logLine = *'CoreData: Ubiquity: <PFUbiquityImportScanOperation:'*'got subpaths of root location: ('* ]]; then
# importOperation paths
continue
elif [[ $logLine = *'CoreData: Ubiquity: <PFUbiquityImportScanOperation:'*'Ignoring subpath (model version hash):'* ]]; then
# importOperation path
continue
elif [[ $logLine = *'CoreData: Ubiquity: <PFUbiquityImportScanOperation:'*'Got candidate log locations: ('* ]]; then
# ?
continue
elif [[ $logLine = *'CoreData: Ubiquity: Initiated download for urls: ('* ]]; then
# ?
continue
elif [[ $logLine = *'CoreData: Ubiquity: Finished scan of root location'* ]]; then
# ? location(finished, pending, peers)
continue
elif [[ $logLine = *'CoreData: Ubiquity: Post store setup succeded.'* ]]; then
# store
continue
elif [[ $logLine = *'CoreData: Ubiquity: Ignoring private file:'* ]]; then
# path
continue
elif [[ $logLine = *'CoreData: Ubiquity: Scheduling response to baseline:'* ]]; then
# location
continue
elif [[ $logLine = *'CoreData: Ubiquity: Registered coordinators: {('* ]]; then
# pscs
continue
elif [[ $logLine = *'CoreData: Ubiquity: store name: '* ]]; then
# storeName storeOptions store
continue
elif [[ $logLine = *'CoreData: Ubiquity: Store:'* ]]; then
# store
continue
elif [[ $logLine = *'CoreData: Ubiquity: Adding operation' ]]; then
# -
continue
elif [[ $logLine = *'CoreData: Ubiquity: Responding to baseline:'* ]]; then
# baseline permanentLocation safeLocation currentLocation storeName modelVersionHash baselineArchiveLocation
continue
elif [[ $logLine = *'CoreData: Ubiquity: <PFUbiquityBaseline:'*'Checking to see if it can replace store with knowledge vector:'* ]]; then
# baseline permanentLocation safeLocation currentLocation storeName modelVersionHash baselineArchiveLocation kv
continue
elif [[ $logLine = *'CoreData: Ubiquity: <PFUbiquityBaseline:'*'Local store is current with the baseline' ]]; then
# baseline permanentLocation safeLocation currentLocation storeName modelVersionHash baselineArchiveLocation
continue
elif [[ $logLine = *'CoreData: Ubiquity: <PFUbiquityBaseline:'*'Finished check: 0' ]]; then
# baseline permanentLocation safeLocation currentLocation storeName modelVersionHash baselineArchiveLocation
continue
elif [[ $logLine = *'CoreData: Ubiquity: Can adopt: 0 replace: 0'*'kv:'* ]]; then
# kv
continue
elif [[ $logLine = *'CoreData: Ubiquity: <_PFUbiquityRecordsImporter:'*'Scheduling root scan'* ]]; then
# importer ubiquityRootLocation localPeerID scan(x,y)
continue
elif [[ $logLine = *'CoreData: Ubiquity: <_PFUbiquityRecordsImporter:'*'adding root scan: <PFUbiquityImportScanOperation: '*'> to queue:'* ]]; then
# importer ubiquityRootLocation localPeerID scanOperation operationQueue
continue
elif [[ $logLine = *'CoreData: Ubiquity: <_PFUbiquityRecordsImporter:'*'Registering for application resumed notification.'* ]]; then
# importer ubiquityRootLocation localPeerID
continue
elif [[ $logLine = *'CoreData: Ubiquity: Got empty knowledge vector from string:' ]]; then
# -
continue
elif [[ $logLine = *'CoreData: Ubiquity: <_PFUbiquityRecordsImporter:'*'importing operations:'* ]]; then
# importer ubiquityRootLocation localPeerID importOperations
continue
elif [[ $logLine = *'CoreData: Ubiquity: <_PFUbiquityRecordsImporter:'*'Finished scheduling logs with context:'* ]]; then
# importer ubiquityRootLocation localPeerID importContext pendingLogs scheduledLogs failedLogs ignoredlogs encounteredErrors
continue
elif [[ $logLine = *'CoreData: Ubiquity: <_PFUbiquityRecordsImporter:'*'Will reschedule pending logs:'* ]]; then
# importer ubiquityRootLocation localPeerID pendingLogs failedLogs
continue
elif [[ $logLine = *'CoreData: Ubiquity: <_PFUbiquityRecordsImporter:'*'will process operation:'* ]]; then
# importer ubiquityRootLocation localPeerID importOperation localPeerID logScore transactionLog transactionLogLocation transactionNumber
continue
elif [[ $logLine = *'CoreData: Ubiquity: <_PFUbiquityRecordsImporter:'*'Got set of persistent store coordinators for store named:'* ]]; then
# importer ubiquityRootLocation localPeerID importOperation localPeerID storeName pscs
continue
elif [[ $logLine = *'CoreData: Ubiquity: <_PFUbiquityRecordsImporter:'*'Wrote pending entries to disk after imports finished.' ]]; then
# importer ubiquityRootLocation localPeerID importOperation localPeerID
continue
elif [[ $logLine = *'CoreData: Ubiquity: <_PFUbiquityRecordImportOperation:'*'Beginning parse of log file:'* ]]; then
# importOperation localPeerID logScore transactionLog transactionLogLocation transactionNumber PFUbiquityTransactionLog transactionLogLocation transactionNumber
continue
elif [[ $logLine = *'CoreData: Ubiquity: <_PFUbiquityRecordImportOperation:'*'Cache KV matches initial KV'* ]]; then
# importOperation localPeerID logScore transactionLog transactionLogLocation transactionNumber
continue
elif [[ $logLine = *'CoreData: Ubiquity: <_PFUbiquityRecordImportOperation:'*'Successfully prefetched managed objects.' ]]; then
# importOperation localPeerID logScore transactionLog transactionLogLocation transactionNumber
continue
elif [[ $logLine = *'CoreData: Ubiquity: <_PFUbiquityRecordImportOperation:'*'successfully applied changes for object with global id:'* ]]; then
# importOperation localPeerID logScore transactionLog transactionLogLocation transactionNumber globalId object:remotePeer
continue
elif [[ $logLine = *'CoreData: Ubiquity: <_PFUbiquityRecordImportOperation:'*'Successfully wrote changes.'* ]]; then
# importOperation localPeerID logScore transactionLog transactionLogLocation transactionNumber
continue
elif [[ $logLine = *'CoreData: Ubiquity: <_PFUbiquityRecordImportOperation:'*'Successfully wrote metadata changes.'* ]]; then
# importOperation localPeerID logScore transactionLog transactionLogLocation transactionNumber
continue
elif [[ $logLine = *'CoreData: Ubiquity: About to apply changes from log contents.' ]]; then
# -
continue
elif [[ $logLine = *'CoreData: Ubiquity: Posting import notification:'* ]]; then
# notification objects psc
continue
elif (( unhandled )); then
firstLogLine=${logLine%%$'\n'*} firstLogLine=${firstLogLine#*] }
[[ ${logLine#*$firstLogLine} ]] && firstLogLine+=" [...]"
wrn -- '[unhandled] %s' "$firstLogLine"
#wrn -- "$logLine"
fi
done