Structured logging (#831)

* Structured logging support

* Bump the SDK, fix breaking changes

* Enabled more logging of timeline diffs

* Keep only source file last path components in logs

* Bump the SDK, tweaks following code review
This commit is contained in:
Stefan Ceriu
2023-04-25 14:48:20 +03:00
committed by GitHub
parent 0d3e823b69
commit be8adb19b5
20 changed files with 286 additions and 252 deletions
@@ -80,7 +80,13 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
// MARK: - Private
fileprivate func updateRoomsWithDiffs(_ diffs: [SlidingSyncListRoomsListDiff]) {
MXLog.info("Received \(diffs.count) diffs")
let span = MXLog.createSpan("process_room_list_diffs")
span.enter()
defer {
span.exit()
}
MXLog.verbose("Received \(diffs.count) diffs")
rooms = diffs
.reduce(rooms) { currentItems, diff in
@@ -101,7 +107,7 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
detectDuplicatesInRoomList(rooms)
MXLog.info("Finished applying \(diffs.count) diffs, new count: \(rooms.count)")
MXLog.verbose("Finished applying \(diffs.count) diffs, new count: \(rooms.count)")
}
private func buildRoomSummaryForIdentifier(_ identifier: String, invalidated: Bool) -> RoomSummary {