Skip to content

Commit

Permalink
Fix variables in logging (#5)
Browse files Browse the repository at this point in the history
* Fix logging

* Include buffer name in log
  • Loading branch information
jeffreykuiken authored Oct 2, 2022
1 parent db50387 commit a6bf35a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/Cirrus/DeleteRecordContext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ final class DeleteRecordContext<Persistable: CloudKitCodable>: RecordModifyingCo
}
set {
do {
logHandler("Updating \(newValue.count) buffer with %d items", .info)
logHandler("Updating \(self.name) buffer with \(newValue.count) items", .info)
let data = try NSKeyedArchiver.archivedData(
withRootObject: newValue, requiringSecureCoding: true)
defaults.set(data, forKey: deleteBufferKey)
Expand Down
2 changes: 1 addition & 1 deletion Sources/Cirrus/SyncEngine+RecordModification.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ extension SyncEngine {
guard !context.recordIDsToDelete.isEmpty || !context.recordsToSave.isEmpty else { return }

self.logHandler(
"Using \(context.name) context, found %d local items(s) for upload and \(context.recordsToSave.count) for deletion.",
"Using \(context.name) context, found \(context.recordsToSave.count) local items(s) for upload and \(context.recordIDsToDelete.count) for deletion.",
.debug
)

Expand Down

0 comments on commit a6bf35a

Please sign in to comment.