mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-10 21:39:12 +00:00
Move tracing configuration to the rust side.
This commit is contained in:
parent
2671d90bc1
commit
57b85d2650
@ -47,12 +47,12 @@
|
||||
05FF0CD80EDAB3A7C0D4700A /* InfoPlistReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A580295A56B55A856CC4084 /* InfoPlistReader.swift */; };
|
||||
0638CBDE3098B1C3F23AFCFA /* MXLog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 111B698739E3410E2CDB7144 /* MXLog.swift */; };
|
||||
066A1E9B94723EE9F3038044 /* Strings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47EBB5D698CE9A25BB553A2D /* Strings.swift */; };
|
||||
069358C2C825A19DE6CB127E /* TracingConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED003DF1B7CF40E7073A2280 /* TracingConfiguration.swift */; };
|
||||
06B31F84CE52A7A7C271267C /* SecureBackupRecoveryKeyScreenViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0FF08D0BD7D0B4B6877AB7D /* SecureBackupRecoveryKeyScreenViewModelTests.swift */; };
|
||||
06B55882911B4BF5B14E9851 /* URL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 227AC5D71A4CE43512062243 /* URL.swift */; };
|
||||
06D3942496E9E0E655F14D21 /* NotificationManagerProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = A057F2FDC14866C3026A89A4 /* NotificationManagerProtocol.swift */; };
|
||||
06F8EDF52E33A2D36BCC1161 /* AppLockScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56D6F88FE35A0979D2821E06 /* AppLockScreen.swift */; };
|
||||
071A017E415AD378F2961B11 /* URL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 227AC5D71A4CE43512062243 /* URL.swift */; };
|
||||
0728314DD51AC3819F818EA8 /* LogLevel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2711E5996016ABD6EAAEB58A /* LogLevel.swift */; };
|
||||
07376A5274822EB45CC320C7 /* InvitedRoomProxyMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A21027F05874B1BCC3E452B /* InvitedRoomProxyMock.swift */; };
|
||||
07756D532EFE33DD1FA258E5 /* GeoURITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A7ED2EF5BDBAD2A7DBC4636 /* GeoURITests.swift */; };
|
||||
077CB230153E072C94B1E6C3 /* AppAppearance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D65BCC659FD9087E49B3C25 /* AppAppearance.swift */; };
|
||||
@ -103,6 +103,7 @@
|
||||
119AE9A3FC6E0606C1146528 /* NotificationSettingsEditScreenRoomCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C97F8963B14EB0AF3940DDBF /* NotificationSettingsEditScreenRoomCell.swift */; };
|
||||
11A6B8E3CBDBF0A4107FF4CE /* OnboardingFlowCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3285BD95B564CA2A948E511 /* OnboardingFlowCoordinator.swift */; };
|
||||
1224084B7E289E0830BA2C54 /* VoiceMessageRoomTimelineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6A293D06BAB2B7A17D9314B /* VoiceMessageRoomTimelineView.swift */; };
|
||||
126CBCF5B0145FA1377C1316 /* Tracing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83B574805B9812C111D6215D /* Tracing.swift */; };
|
||||
126EE01D8BEAEF26105D83C5 /* RoomDetailsScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1A5FEF17ED7E6176D922D4F /* RoomDetailsScreen.swift */; };
|
||||
128FFD8A3D85845F9A927F47 /* PollRoomTimelineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF8548D48512127CCC17C520 /* PollRoomTimelineView.swift */; };
|
||||
12C867E85E6D12EEDFD0B127 /* CustomStringConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96C4762F8D6112E43117DB2F /* CustomStringConvertible.swift */; };
|
||||
@ -192,7 +193,6 @@
|
||||
24A75F72EEB7561B82D726FD /* Date.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2141693488CE5446BB391964 /* Date.swift */; };
|
||||
24B7CD41342C143117ADA768 /* Comparable.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2B1CC9AA154F4D5435BF60A /* Comparable.swift */; };
|
||||
24BDDD09A90B8BFE3793F3AA /* ClientProxyProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6033779EB37259F27F938937 /* ClientProxyProtocol.swift */; };
|
||||
24DF253C18D3E2C56DD0E597 /* TracingConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED003DF1B7CF40E7073A2280 /* TracingConfiguration.swift */; };
|
||||
25618589E0DE0F1E95FC7B5C /* EmojiProviderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 099F2D36C141D845A445B1E6 /* EmojiProviderTests.swift */; };
|
||||
256D76972BA3254F7CB7F88B /* LocationAnnotation.swift in Sources */ = {isa = PBXBuildFile; fileRef = AAD8234D0E9C9B12BF9F240B /* LocationAnnotation.swift */; };
|
||||
25C4C1100B6EA79F5CC7CBB5 /* AppLockSetupPINScreenViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 989D7380D9C86B3A10D30B13 /* AppLockSetupPINScreenViewModelTests.swift */; };
|
||||
@ -209,7 +209,6 @@
|
||||
27FEF0F40750465195C9D6D6 /* RoomSelectionScreenModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B9D191A81FFB0C72CE73E77 /* RoomSelectionScreenModels.swift */; };
|
||||
2814E7075BF3A5C0CCBC9F90 /* RoomDirectorySearchView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84AF32E4136FD6F159D86C2C /* RoomDirectorySearchView.swift */; };
|
||||
281BED345D59A9A6A99E9D98 /* UNNotificationContent.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE148A4FFEE853C5A281500C /* UNNotificationContent.swift */; };
|
||||
282A5F3375DDC774AE09B0C3 /* TracingConfigurationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1734A445A58ED855B977A0A8 /* TracingConfigurationTests.swift */; };
|
||||
2835FD52F3F618D07F799B3D /* Publisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7310D8DFE01AF45F0689C3AA /* Publisher.swift */; };
|
||||
290FDB0FFDC2F1DDF660343E /* TestMeasurementParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C4048041C1A6B20CB97FD18 /* TestMeasurementParser.swift */; };
|
||||
292827744227DF61C930BDDB /* CreateRoomScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = FB0D6CB491777E7FC6B5BA12 /* CreateRoomScreen.swift */; };
|
||||
@ -405,7 +404,6 @@
|
||||
50381244BA280451771BE3ED /* PINTextFieldTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF13BFD415CA84B1272E94F8 /* PINTextFieldTests.swift */; };
|
||||
5038E69A5E6A89DE1A345E04 /* ShouldScrollOnKeyboardDidShow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 832397B5C3D00A4BF52C5F0B /* ShouldScrollOnKeyboardDidShow.swift */; };
|
||||
50539366B408780B232C1910 /* EstimatedWaveformView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD0FF64B0E6470F66F42E182 /* EstimatedWaveformView.swift */; };
|
||||
50C90117FE25390BFBD40173 /* RustTracing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 542D4F49FABA056DEEEB3400 /* RustTracing.swift */; };
|
||||
5100F53E6884A15F9BA07CC3 /* AttributedStringTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37CA26F55123E36B50DB0B3A /* AttributedStringTests.swift */; };
|
||||
5139F4BD5A5DF6F8D11A9BDE /* NotificationPermissionsScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46D0BA44B1838E65B507B277 /* NotificationPermissionsScreen.swift */; };
|
||||
518C93DC6516D3D018DE065F /* UNNotificationRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49E751D7EDB6043238111D90 /* UNNotificationRequest.swift */; };
|
||||
@ -464,6 +462,7 @@
|
||||
5DB4334CBBA142376FF5FFEC /* preview_image.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 200626E8353AB2729444F991 /* preview_image.jpg */; };
|
||||
5DD0EF30070DC0A82C5CCD33 /* RoomMembersListManageMemberSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC853F9B4FBE039D2C16EC6B /* RoomMembersListManageMemberSheet.swift */; };
|
||||
5DD85A0FE3D85AEC3C7EFE36 /* DeveloperOptionsScreenCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C7C7CFA6B2A62A685FF6CE3 /* DeveloperOptionsScreenCoordinator.swift */; };
|
||||
5EDBDE802761B5ECB54E6787 /* LogLevel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2711E5996016ABD6EAAEB58A /* LogLevel.swift */; };
|
||||
5EE1D4E316D66943E97FDCF2 /* BloomView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7BEB970F500BFB248443FA1 /* BloomView.swift */; };
|
||||
5F06AD3C66884CE793AE6119 /* FileManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04DF593C3F7AF4B2FBAEB05D /* FileManager.swift */; };
|
||||
5F0B5797D1BFF2A51084B4C3 /* PinnedEventsTimelineScreenViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86D7CD5CA270BFC3EBB450CA /* PinnedEventsTimelineScreenViewModel.swift */; };
|
||||
@ -564,7 +563,6 @@
|
||||
71C1347F23868324A4F43940 /* NavigationModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A22A05E472533ED3C5A31B3 /* NavigationModule.swift */; };
|
||||
7254FB2EFDD43BC8BB7A1213 /* SecurityAndPrivacyScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4AE42C19EDE64B7CB7BE4D0 /* SecurityAndPrivacyScreen.swift */; };
|
||||
733E2B19AB1FDA3B93293A28 /* AppLockSetupPINScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3F275432954C8C6B1B7D966 /* AppLockSetupPINScreen.swift */; };
|
||||
7354D094A4C59B555F407FA1 /* RustTracing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 542D4F49FABA056DEEEB3400 /* RustTracing.swift */; };
|
||||
73F33E9776B7A50B65A031D2 /* AppLockSettingsScreenViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0BA67B3E4EF9D29D14A78CE /* AppLockSettingsScreenViewModelTests.swift */; };
|
||||
73F547BEB41D3DAFAAF6E0AF /* UserProfileScreenViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71E2E5103702D13361D09100 /* UserProfileScreenViewModelTests.swift */; };
|
||||
7405B4824D45BA7C3D943E76 /* Application.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D0CBC76C80E04345E11F2DB /* Application.swift */; };
|
||||
@ -613,7 +611,6 @@
|
||||
7A642EE5F1ADC5D520F21924 /* MediaProviderProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85EB16E7FE59A947CA441531 /* MediaProviderProtocol.swift */; };
|
||||
7A71AEF419904209BB8C2833 /* UserAgentBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F2529D434C750ED78ADF1ED /* UserAgentBuilder.swift */; };
|
||||
7A8B264506D3DDABC01B4EEB /* AppMediator.swift in Sources */ = {isa = PBXBuildFile; fileRef = B53AC78E49A297AC1D72A7CF /* AppMediator.swift */; };
|
||||
7AED78DC086695E93F0647D2 /* RustTracing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 542D4F49FABA056DEEEB3400 /* RustTracing.swift */; };
|
||||
7B1605C6FFD4D195F264A684 /* RoomPollsHistoryScreenViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B40233F2989AD49906BB310D /* RoomPollsHistoryScreenViewModelTests.swift */; };
|
||||
7B3A59786DB2F741A1743ED0 /* PinnedEventsTimelineScreenViewModelProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 510E89B989477E5EE8E503C0 /* PinnedEventsTimelineScreenViewModelProtocol.swift */; };
|
||||
7B5DAB915357BE596529BF25 /* MapTilerStaticMapProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20872C3887F835958CE2F1D0 /* MapTilerStaticMapProtocol.swift */; };
|
||||
@ -695,6 +692,7 @@
|
||||
899359A4D1147601F6C4E364 /* PillConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB8D34E94AB07128DB73D6C7 /* PillConstants.swift */; };
|
||||
899793EFC63DF93C3E0141E7 /* RoomMemberDetailsScreenCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FA60F848D1C14F873F9621A /* RoomMemberDetailsScreenCoordinator.swift */; };
|
||||
89B909AC66B96FA054EF3C14 /* InvitedRoomProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E95B3BDB80531C85CD50AE6 /* InvitedRoomProxy.swift */; };
|
||||
89DF67AECBF9D0EE0DDB7737 /* Tracing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83B574805B9812C111D6215D /* Tracing.swift */; };
|
||||
8A0BD60CA4A6004DB06B5403 /* MediaUploadingPreprocessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 669F35C505ACE1110589F875 /* MediaUploadingPreprocessor.swift */; };
|
||||
8A5064CAC8E5F3B18645621D /* CallNotificationRoomTimelineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD6E082B0507FB28F966516A /* CallNotificationRoomTimelineView.swift */; };
|
||||
8A6CB15C8FC68F557750BF54 /* AuthenticationClientBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F569CFB77E0D40BD82203D9 /* AuthenticationClientBuilder.swift */; };
|
||||
@ -912,6 +910,7 @@
|
||||
B79E8AB83EBBDCD476D0362F /* PollFormScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = D622EC7898469BB1D0881CDD /* PollFormScreen.swift */; };
|
||||
B7C9E07F4F9CCC8DD7156A20 /* CallScreenModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28146817C61423CACCF942F5 /* CallScreenModels.swift */; };
|
||||
B7F58D6903F9D509EDAB9E4F /* MediaEventsTimelineScreenModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7033218DA395B003F7AB29A2 /* MediaEventsTimelineScreenModels.swift */; };
|
||||
B81840E45D8746A4692DA774 /* Tracing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83B574805B9812C111D6215D /* Tracing.swift */; };
|
||||
B818580464CFB5400A3EF6AE /* TimelineModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = 029D5701F80A9AF7167BB4D0 /* TimelineModels.swift */; };
|
||||
B855AF29D7D8FC8DAAA73D4A /* test_voice_message.m4a in Resources */ = {isa = PBXBuildFile; fileRef = DCA2D836BD10303F37FAAEED /* test_voice_message.m4a */; };
|
||||
B879446FD8E65A711EF8F9F7 /* AdvancedSettingsScreenViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B63B69F9A2BC74DD40DC75C8 /* AdvancedSettingsScreenViewModel.swift */; };
|
||||
@ -1067,6 +1066,7 @@
|
||||
D97C782FE0005995C36FA04A /* portrait_test_video.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = E5E7D4EE7CA295E5039FDA21 /* portrait_test_video.mp4 */; };
|
||||
D98B5EE8C4F5A2CE84687AE8 /* UTType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897DF5E9A70CE05A632FC8AF /* UTType.swift */; };
|
||||
D9F80CE61BF8FF627FDB0543 /* LoadableImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = C352359663A0E52BA20761EE /* LoadableImage.swift */; };
|
||||
DA10C99BA43A0F1E732F6274 /* LogLevel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2711E5996016ABD6EAAEB58A /* LogLevel.swift */; };
|
||||
DA7E867F5EAFF8E20B2EE3B6 /* SecureBackupScreenModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B3D16709ADD4F4BCC710B1E /* SecureBackupScreenModels.swift */; };
|
||||
DAF63A9CF9932CA8F6830F11 /* ShareExtensionModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCAC01A97A43BE07B9E94E43 /* ShareExtensionModels.swift */; };
|
||||
DB079D1929B5A5F52D207C83 /* RoomDetailsScreenModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = 466C71A0FED9BFF287613C82 /* RoomDetailsScreenModels.swift */; };
|
||||
@ -1106,7 +1106,6 @@
|
||||
E3291AD16D7A5CB14781819C /* UserNotificationCenterProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45D8149FDDA0315CDC553B4B /* UserNotificationCenterProtocol.swift */; };
|
||||
E32A18802EB37EEE3EF7B965 /* GlobalSearchScreenViewModelProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B788615712FED326F73D3F83 /* GlobalSearchScreenViewModelProtocol.swift */; };
|
||||
E362924A42934C9F0F97A956 /* OIDCConfigurationProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = A69869844D2B6F5BD9AABF85 /* OIDCConfigurationProxy.swift */; };
|
||||
E37044401D9951D6C02C0855 /* TracingConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED003DF1B7CF40E7073A2280 /* TracingConfiguration.swift */; };
|
||||
E3AC72E3E58F364EF15C1CC7 /* NotificationSettingsScreenViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 514363244AE7D68080D44C6F /* NotificationSettingsScreenViewModelTests.swift */; };
|
||||
E3CA565A4B9704F191B191F0 /* JoinedRoomSize+MemberCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = CBF9AEA706926DD0DA2B954C /* JoinedRoomSize+MemberCount.swift */; };
|
||||
E3E1E255DC8CB34BD8573E0D /* UserIndicatorControllerProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = A12D3B1BCF920880CA8BBB6B /* UserIndicatorControllerProtocol.swift */; };
|
||||
@ -1435,7 +1434,6 @@
|
||||
1627F2D56477BD331F6D732C /* RoomHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomHeaderView.swift; sourceTree = "<group>"; };
|
||||
16D09C79746BDCD9173EB3A7 /* RoomDetailsEditScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomDetailsEditScreenModels.swift; sourceTree = "<group>"; };
|
||||
1715E3D7F53C0748AA50C91C /* PostHogAnalyticsClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PostHogAnalyticsClient.swift; sourceTree = "<group>"; };
|
||||
1734A445A58ED855B977A0A8 /* TracingConfigurationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TracingConfigurationTests.swift; sourceTree = "<group>"; };
|
||||
17A8AA0DFA06012A9DAB951E /* TimelineProxyMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineProxyMock.swift; sourceTree = "<group>"; };
|
||||
17F7A723A46DF5C95BE15EBF /* clear.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = clear.png; sourceTree = "<group>"; };
|
||||
18486B87745B1811E7FBD3D2 /* AnalyticsPromptScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalyticsPromptScreenModels.swift; sourceTree = "<group>"; };
|
||||
@ -1523,6 +1521,7 @@
|
||||
267BB1D5B08A9511F894CB57 /* PreviewTests.xctestplan */ = {isa = PBXFileReference; path = PreviewTests.xctestplan; sourceTree = "<group>"; };
|
||||
26B0A96B8FE4849227945067 /* VoiceMessageRecorder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VoiceMessageRecorder.swift; sourceTree = "<group>"; };
|
||||
26EAAB54C6CE91D64B69A9F8 /* AppLockServiceProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppLockServiceProtocol.swift; sourceTree = "<group>"; };
|
||||
2711E5996016ABD6EAAEB58A /* LogLevel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogLevel.swift; sourceTree = "<group>"; };
|
||||
2721D7B051F0159AA919DA05 /* RoomChangePermissionsScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomChangePermissionsScreenViewModelProtocol.swift; sourceTree = "<group>"; };
|
||||
2757B1BE23DF8AA239937243 /* AudioConverterProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioConverterProtocol.swift; sourceTree = "<group>"; };
|
||||
277C20CDD5B64510401B6D0D /* ServerConfigurationScreenViewStateTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServerConfigurationScreenViewStateTests.swift; sourceTree = "<group>"; };
|
||||
@ -1742,7 +1741,6 @@
|
||||
536E72DCBEEC4A1FE66CFDCE /* target.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = target.yml; sourceTree = "<group>"; };
|
||||
53F41CEAAE2BB4E74CDC2278 /* TimelineMediaPreviewViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineMediaPreviewViewModel.swift; sourceTree = "<group>"; };
|
||||
53FD6D3D38F556CEAA280C58 /* test_animated_image.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = test_animated_image.gif; sourceTree = "<group>"; };
|
||||
542D4F49FABA056DEEEB3400 /* RustTracing.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RustTracing.swift; sourceTree = "<group>"; };
|
||||
5445FCE0CE15E634FDC1A2E2 /* AnalyticsService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalyticsService.swift; sourceTree = "<group>"; };
|
||||
5484457C81B325660901B161 /* AppLockSetupSettingsScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppLockSetupSettingsScreen.swift; sourceTree = "<group>"; };
|
||||
54A5E6F398C269AD52C9AE21 /* EncryptionResetPasswordScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EncryptionResetPasswordScreenModels.swift; sourceTree = "<group>"; };
|
||||
@ -1939,6 +1937,7 @@
|
||||
837B440C4705E4B899BCB899 /* RoomDetailsScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomDetailsScreenViewModel.swift; sourceTree = "<group>"; };
|
||||
839E2C35DF3F9C7B54C3CE49 /* RoundedCornerShape.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoundedCornerShape.swift; sourceTree = "<group>"; };
|
||||
83B4E3F1265581683E4997B8 /* RoomSelectionScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomSelectionScreenViewModel.swift; sourceTree = "<group>"; };
|
||||
83B574805B9812C111D6215D /* Tracing.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tracing.swift; sourceTree = "<group>"; };
|
||||
84311D707B09854D67F78BBF /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
845DDBDE5A0887E73D38B826 /* InviteUsersViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InviteUsersViewModelTests.swift; sourceTree = "<group>"; };
|
||||
848F69921527D31CAACB93AF /* SecureBackupLogoutConfirmationScreenViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecureBackupLogoutConfirmationScreenViewModelTests.swift; sourceTree = "<group>"; };
|
||||
@ -2438,7 +2437,6 @@
|
||||
ECB836DD8BE31931F51B8AC9 /* EncryptionSettingsFlowCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EncryptionSettingsFlowCoordinator.swift; sourceTree = "<group>"; };
|
||||
ECD5FCBA169B6A82F501CA1B /* AnalyticsSettingsScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalyticsSettingsScreenViewModelProtocol.swift; sourceTree = "<group>"; };
|
||||
ECF79FB25E2D4BD6F50CE7C9 /* RoomMembersListScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomMembersListScreenViewModel.swift; sourceTree = "<group>"; };
|
||||
ED003DF1B7CF40E7073A2280 /* TracingConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TracingConfiguration.swift; sourceTree = "<group>"; };
|
||||
ED044D00F2176681CC02CD54 /* HomeScreenRoomCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeScreenRoomCell.swift; sourceTree = "<group>"; };
|
||||
ED0CBEAB5F796BEFBAF7BB6A /* VideoRoomTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoRoomTimelineView.swift; sourceTree = "<group>"; };
|
||||
ED1D792EB82506A19A72C8DE /* RoomTimelineItemProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomTimelineItemProtocol.swift; sourceTree = "<group>"; };
|
||||
@ -2692,9 +2690,9 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
41A8571A8A071FB41778C016 /* ExtensionLogger.swift */,
|
||||
2711E5996016ABD6EAAEB58A /* LogLevel.swift */,
|
||||
111B698739E3410E2CDB7144 /* MXLog.swift */,
|
||||
542D4F49FABA056DEEEB3400 /* RustTracing.swift */,
|
||||
ED003DF1B7CF40E7073A2280 /* TracingConfiguration.swift */,
|
||||
83B574805B9812C111D6215D /* Tracing.swift */,
|
||||
);
|
||||
path = Logging;
|
||||
sourceTree = "<group>";
|
||||
@ -4201,7 +4199,6 @@
|
||||
9AA3AF94A06D319BB37E52DA /* TimelineItemFactoryTests.swift */,
|
||||
5C1F000589F2CEE6B03ECFAB /* TimelineMediaPreviewViewModelTests.swift */,
|
||||
6509708F54FC883604DFDC95 /* TimelineViewModelTests.swift */,
|
||||
1734A445A58ED855B977A0A8 /* TracingConfigurationTests.swift */,
|
||||
76310030C831D4610A705603 /* URLComponentsTests.swift */,
|
||||
EB3B237387B8288A5A938F1B /* UserAgentBuilderTests.swift */,
|
||||
2429224EB0EEA34D35CE9249 /* UserIndicatorControllerTests.swift */,
|
||||
@ -6507,6 +6504,7 @@
|
||||
8691186F9B99BCDDB7CACDD8 /* KeychainController.swift in Sources */,
|
||||
A440D4BC02088482EC633A88 /* KeychainControllerProtocol.swift in Sources */,
|
||||
FB0A9D06FC9122E37992D962 /* LayoutDirection.swift in Sources */,
|
||||
0728314DD51AC3819F818EA8 /* LogLevel.swift in Sources */,
|
||||
AD2A81B65A9F6163012086F1 /* MXLog.swift in Sources */,
|
||||
52473A4D7B1FBD4CD1E770C8 /* MatrixEntityRegex.swift in Sources */,
|
||||
8B76191B9DDD1AC90A6E3A35 /* MediaFileHandleProxy.swift in Sources */,
|
||||
@ -6530,13 +6528,12 @@
|
||||
76C874243A8C440D6CF7B344 /* ProcessInfo.swift in Sources */,
|
||||
414F50CFCFEEE2611127DCFB /* RestorationToken.swift in Sources */,
|
||||
17BC15DA08A52587466698C5 /* RoomMessageEventStringBuilder.swift in Sources */,
|
||||
7354D094A4C59B555F407FA1 /* RustTracing.swift in Sources */,
|
||||
7573D682F089205F7F1D96CF /* SessionDirectories.swift in Sources */,
|
||||
422E8D182CA688D4565CD1E1 /* String.swift in Sources */,
|
||||
6EC7A40A537CFB3D526A111C /* Strings.swift in Sources */,
|
||||
719E7AAD1F8E68F68F30FECD /* Task.swift in Sources */,
|
||||
E0FB26262689F04D66A949D7 /* TestablePreview.swift in Sources */,
|
||||
24DF253C18D3E2C56DD0E597 /* TracingConfiguration.swift in Sources */,
|
||||
B81840E45D8746A4692DA774 /* Tracing.swift in Sources */,
|
||||
DDB47D29C6865669288BF87C /* UIFont+AttributedStringBuilder.m in Sources */,
|
||||
45D6DC594816288983627484 /* UITestsScreenIdentifier.swift in Sources */,
|
||||
281BED345D59A9A6A99E9D98 /* UNNotificationContent.swift in Sources */,
|
||||
@ -6662,7 +6659,6 @@
|
||||
0D4EB2ABAA5FE8CB10FDBCB8 /* TimelineItemFactoryTests.swift in Sources */,
|
||||
F6BF52CB027393EE03CEC523 /* TimelineMediaPreviewViewModelTests.swift in Sources */,
|
||||
2F6207CB5C4715FE313B1E95 /* TimelineViewModelTests.swift in Sources */,
|
||||
282A5F3375DDC774AE09B0C3 /* TracingConfigurationTests.swift in Sources */,
|
||||
8E650379587C31D7912ED67B /* UNNotification+Creator.swift in Sources */,
|
||||
AF33B9044498211C3D82F1E1 /* UNTextInputNotificationResponse+Creator.swift in Sources */,
|
||||
20C16A3F718802B0E4A19C83 /* URLComponentsTests.swift in Sources */,
|
||||
@ -6699,14 +6695,14 @@
|
||||
F38D32C1B0232AAFE6A0822C /* ExtensionLogger.swift in Sources */,
|
||||
C022284E2774A5E1EF683B4D /* FileManager.swift in Sources */,
|
||||
05FF0CD80EDAB3A7C0D4700A /* InfoPlistReader.swift in Sources */,
|
||||
DA10C99BA43A0F1E732F6274 /* LogLevel.swift in Sources */,
|
||||
0638CBDE3098B1C3F23AFCFA /* MXLog.swift in Sources */,
|
||||
1A3783005E6945F8583AF997 /* NSItemProvider.swift in Sources */,
|
||||
BE8E5985771DF9137C6CE89A /* ProcessInfo.swift in Sources */,
|
||||
7AED78DC086695E93F0647D2 /* RustTracing.swift in Sources */,
|
||||
DAF63A9CF9932CA8F6830F11 /* ShareExtensionModels.swift in Sources */,
|
||||
5AA81A4E2D40A32A9E7F71F2 /* ShareExtensionView.swift in Sources */,
|
||||
5AC5CD6D893073EE4D9A277E /* ShareExtensionViewController.swift in Sources */,
|
||||
069358C2C825A19DE6CB127E /* TracingConfiguration.swift in Sources */,
|
||||
89DF67AECBF9D0EE0DDB7737 /* Tracing.swift in Sources */,
|
||||
03BD83E8BDD23AE059802E0D /* UITestsScreenIdentifier.swift in Sources */,
|
||||
26252AA9AED64010788F4C26 /* UIView.swift in Sources */,
|
||||
66E9202BED03B5BB00E812A1 /* URL.swift in Sources */,
|
||||
@ -7060,6 +7056,7 @@
|
||||
854E82E064BA53CD0BC45600 /* LocationRoomTimelineItemContent.swift in Sources */,
|
||||
973C48F9E4EFB808F61BE401 /* LocationRoomTimelineView.swift in Sources */,
|
||||
29491EE7AE37E239E839C5A3 /* LocationSharingScreenModels.swift in Sources */,
|
||||
5EDBDE802761B5ECB54E6787 /* LogLevel.swift in Sources */,
|
||||
36DE961B784087D5E18EF9BA /* LogViewerScreen.swift in Sources */,
|
||||
CF38B70D8C6DD42C00A56A27 /* LogViewerScreenCoordinator.swift in Sources */,
|
||||
5518DA4A6C9B4FC4B497EA9A /* LogViewerScreenModels.swift in Sources */,
|
||||
@ -7357,7 +7354,6 @@
|
||||
B272E5D1DE8BDA87A6B7A696 /* RoomTimelineProviderMock.swift in Sources */,
|
||||
77D7DAA41AAB36800C1F2E2D /* RoomTimelineProviderProtocol.swift in Sources */,
|
||||
B2F8E01ABA1BA30265B4ECBE /* RoundedCornerShape.swift in Sources */,
|
||||
50C90117FE25390BFBD40173 /* RustTracing.swift in Sources */,
|
||||
D43F0503EF2CBC55272538FE /* SDKGeneratedMocks.swift in Sources */,
|
||||
88CBF1595E39CE697928DE48 /* SFNumberedListView.swift in Sources */,
|
||||
FB595EC9C00AB32F39034055 /* SceneDelegate.swift in Sources */,
|
||||
@ -7511,7 +7507,7 @@
|
||||
67EFF46180B939CBF389AECD /* TimelineView.swift in Sources */,
|
||||
98EE4259A4A49BC757BA442C /* TimelineViewModel.swift in Sources */,
|
||||
F8B2F5CBCF2A0E0798E8D646 /* TimelineViewModelProtocol.swift in Sources */,
|
||||
E37044401D9951D6C02C0855 /* TracingConfiguration.swift in Sources */,
|
||||
126CBCF5B0145FA1377C1316 /* Tracing.swift in Sources */,
|
||||
298F9EC30E918F12AB7F1EE8 /* TypingIndicatorView.swift in Sources */,
|
||||
36AC963F2F04069B7FF1AA0C /* UIConstants.swift in Sources */,
|
||||
A37EED79941AD3B7140B3822 /* UIDevice.swift in Sources */,
|
||||
|
@ -368,7 +368,7 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg
|
||||
}
|
||||
|
||||
if oldVersion < Version(1, 6, 7) {
|
||||
RustTracing.deleteLogFiles()
|
||||
Tracing.deleteLogFiles()
|
||||
MXLog.info("Migrating to v1.6.7, log files have been wiped")
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ import SwiftUI
|
||||
|
||||
// Common settings between app and NSE
|
||||
protocol CommonSettingsProtocol {
|
||||
var logLevel: TracingConfiguration.LogLevel { get }
|
||||
var logLevel: LogLevel { get }
|
||||
var enableOnlySignedDeviceIsolationMode: Bool { get }
|
||||
var hideTimelineMedia: Bool { get }
|
||||
var eventCacheEnabled: Bool { get }
|
||||
@ -294,7 +294,7 @@ final class AppSettings {
|
||||
|
||||
// MARK: - Shared
|
||||
|
||||
@UserPreference(key: UserDefaultsKeys.logLevel, defaultValue: TracingConfiguration.LogLevel.info, storageType: .userDefaults(store))
|
||||
@UserPreference(key: UserDefaultsKeys.logLevel, defaultValue: LogLevel.info, storageType: .userDefaults(store))
|
||||
var logLevel
|
||||
|
||||
/// Configuration to enable only signed device isolation mode for crypto. In this mode only devices signed by their owner will be considered in e2ee rooms.
|
||||
|
@ -66,7 +66,7 @@ enum ExtensionLogger {
|
||||
return "\(formattedStr) MB"
|
||||
}
|
||||
|
||||
static func configure(currentTarget: String, logLevel: TracingConfiguration.LogLevel) {
|
||||
static func configure(currentTarget: String, logLevel: LogLevel) {
|
||||
guard !isConfigured else {
|
||||
return
|
||||
}
|
||||
|
43
ElementX/Sources/Other/Logging/LogLevel.swift
Normal file
43
ElementX/Sources/Other/Logging/LogLevel.swift
Normal file
@ -0,0 +1,43 @@
|
||||
//
|
||||
// Copyright 2025 New Vector Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import MatrixRustSDK
|
||||
|
||||
enum LogLevel: String, Codable, Hashable {
|
||||
case error, warn, info, debug, trace
|
||||
|
||||
var title: String {
|
||||
switch self {
|
||||
case .error:
|
||||
return "Error"
|
||||
case .warn:
|
||||
return "Warning"
|
||||
case .info:
|
||||
return "Info"
|
||||
case .debug:
|
||||
return "Debug"
|
||||
case .trace:
|
||||
return "Trace"
|
||||
}
|
||||
}
|
||||
|
||||
var rustLogLevel: MatrixRustSDK.LogLevel {
|
||||
switch self {
|
||||
case .error:
|
||||
.error
|
||||
case .warn:
|
||||
.warn
|
||||
case .info:
|
||||
.info
|
||||
case .debug:
|
||||
.debug
|
||||
case .trace:
|
||||
.trace
|
||||
}
|
||||
}
|
||||
}
|
@ -26,10 +26,10 @@ enum MXLog {
|
||||
|
||||
static func configure(currentTarget: String,
|
||||
filePrefix: String?,
|
||||
logLevel: TracingConfiguration.LogLevel) {
|
||||
logLevel: LogLevel) {
|
||||
guard !didConfigureOnce else { return }
|
||||
|
||||
RustTracing.setup(configuration: .init(logLevel: logLevel, currentTarget: currentTarget, filePrefix: filePrefix))
|
||||
Tracing.setup(logLevel: logLevel, currentTarget: currentTarget, filePrefix: filePrefix)
|
||||
|
||||
self.currentTarget = currentTarget
|
||||
|
||||
@ -135,7 +135,7 @@ enum MXLog {
|
||||
rootSpan.enter()
|
||||
}
|
||||
|
||||
return Span(file: file, line: UInt32(line), level: level, target: currentTarget, name: name)
|
||||
return Span(file: file, line: UInt32(line), level: level.rustLogLevel, target: currentTarget, name: name)
|
||||
}
|
||||
|
||||
// periphery:ignore:parameters function,column,context
|
||||
@ -154,6 +154,6 @@ enum MXLog {
|
||||
rootSpan.enter()
|
||||
}
|
||||
|
||||
logEvent(file: (file as NSString).lastPathComponent, line: UInt32(line), level: level, target: currentTarget, message: "\(message)")
|
||||
logEvent(file: (file as NSString).lastPathComponent, line: UInt32(line), level: level.rustLogLevel, target: currentTarget, message: "\(message)")
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
import Foundation
|
||||
import MatrixRustSDK
|
||||
|
||||
enum RustTracing {
|
||||
enum Tracing {
|
||||
/// The base filename used for log files. This may be suffixed by the target
|
||||
/// name and other log management metadata during rotation.
|
||||
static let filePrefix = "console"
|
||||
@ -21,27 +21,29 @@ enum RustTracing {
|
||||
}
|
||||
}
|
||||
|
||||
private(set) static var currentTracingConfiguration: TracingConfiguration?
|
||||
static func setup(configuration: TracingConfiguration) {
|
||||
currentTracingConfiguration = configuration
|
||||
static let fileExtension = "log"
|
||||
|
||||
static func setup(logLevel: LogLevel, currentTarget: String, filePrefix: String?) {
|
||||
let fileName = if let filePrefix {
|
||||
"\(Tracing.filePrefix)-\(filePrefix)"
|
||||
} else {
|
||||
Tracing.filePrefix
|
||||
}
|
||||
|
||||
// Keep a minimum of 1 week of log files. In reality it will be longer
|
||||
// as the app is unlikely to be running continuously.
|
||||
let maxFiles: UInt64 = 24 * 7
|
||||
|
||||
// Log everything on integration tests to check whether
|
||||
// the logs contain any sensitive data. See `UserFlowTests.swift`
|
||||
let filter = if ProcessInfo.isRunningIntegrationTests {
|
||||
TracingConfiguration(logLevel: .trace, currentTarget: "integrationtests", filePrefix: nil).filter
|
||||
} else {
|
||||
configuration.filter
|
||||
}
|
||||
// the logs contain any sensitive data. See `integration-tests.yml`
|
||||
let level: LogLevel = ProcessInfo.isRunningIntegrationTests ? .trace : logLevel
|
||||
|
||||
setupTracing(config: .init(filter: filter,
|
||||
setupTracing(config: .init(logLevel: level.rustLogLevel,
|
||||
extraTargets: [currentTarget],
|
||||
writeToStdoutOrSystem: true,
|
||||
writeToFiles: .init(path: logsDirectory.path(percentEncoded: false),
|
||||
filePrefix: configuration.fileName,
|
||||
fileSuffix: configuration.fileExtension,
|
||||
filePrefix: fileName,
|
||||
fileSuffix: fileExtension,
|
||||
maxFiles: maxFiles)))
|
||||
}
|
||||
|
@ -1,140 +0,0 @@
|
||||
//
|
||||
// Copyright 2024 New Vector Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
//
|
||||
|
||||
import Collections
|
||||
|
||||
// This exposes the full Rust side tracing subscriber filter for more flexibility.
|
||||
// We can filter by level, crate and even file. See more details here:
|
||||
// https://docs.rs/tracing-subscriber/0.2.7/tracing_subscriber/filter/struct.EnvFilter.html#examples
|
||||
struct TracingConfiguration {
|
||||
enum LogLevel: String, Codable, Hashable, Comparable {
|
||||
case error, warn, info, debug, trace
|
||||
|
||||
var title: String {
|
||||
switch self {
|
||||
case .error:
|
||||
return "Error"
|
||||
case .warn:
|
||||
return "Warning"
|
||||
case .info:
|
||||
return "Info"
|
||||
case .debug:
|
||||
return "Debug"
|
||||
case .trace:
|
||||
return "Trace"
|
||||
}
|
||||
}
|
||||
|
||||
static func < (lhs: TracingConfiguration.LogLevel, rhs: TracingConfiguration.LogLevel) -> Bool {
|
||||
switch (lhs, rhs) {
|
||||
case (.error, _):
|
||||
true
|
||||
case (.warn, .error):
|
||||
false
|
||||
case (.warn, _):
|
||||
true
|
||||
case (.info, .error), (.info, .warn):
|
||||
false
|
||||
case (.info, _):
|
||||
true
|
||||
case (.debug, .error), (.debug, .warn), (.debug, .info):
|
||||
false
|
||||
case (.debug, _):
|
||||
true
|
||||
case (.trace, _):
|
||||
false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
enum Target: String {
|
||||
case hyper, matrix_sdk_ffi, matrix_sdk_crypto
|
||||
|
||||
case matrix_sdk_client = "matrix_sdk::client"
|
||||
case matrix_sdk_crypto_account = "matrix_sdk_crypto::olm::account"
|
||||
case matrix_sdk_oidc = "matrix_sdk::oidc"
|
||||
case matrix_sdk_http_client = "matrix_sdk::http_client"
|
||||
case matrix_sdk_sliding_sync = "matrix_sdk::sliding_sync"
|
||||
case matrix_sdk_base_sliding_sync = "matrix_sdk_base::sliding_sync"
|
||||
case matrix_sdk_ui_timeline = "matrix_sdk_ui::timeline"
|
||||
case matrix_sdk_event_cache = "matrix_sdk::event_cache"
|
||||
case matrix_sdk_sqlite_event_cache_store = "matrix_sdk_sqlite::event_cache_store"
|
||||
}
|
||||
|
||||
// The `common` target is excluded because 3rd-party crates might end up logging user data.
|
||||
static let targets: OrderedDictionary<Target, LogLevel> = [
|
||||
.hyper: .warn,
|
||||
.matrix_sdk_ffi: .info,
|
||||
.matrix_sdk_client: .trace,
|
||||
.matrix_sdk_crypto: .debug,
|
||||
.matrix_sdk_crypto_account: .trace,
|
||||
.matrix_sdk_oidc: .trace,
|
||||
.matrix_sdk_http_client: .debug,
|
||||
.matrix_sdk_sliding_sync: .info,
|
||||
.matrix_sdk_base_sliding_sync: .info,
|
||||
.matrix_sdk_ui_timeline: .info,
|
||||
.matrix_sdk_event_cache: .info,
|
||||
.matrix_sdk_sqlite_event_cache_store: .info
|
||||
]
|
||||
|
||||
let filter: String
|
||||
|
||||
/// The filename that logs should be written to.
|
||||
let fileName: String
|
||||
/// The file extension to use for log files.
|
||||
let fileExtension = "log"
|
||||
|
||||
/// Sets the same log level for all Targets
|
||||
/// - Parameter logLevel: the desired log level
|
||||
/// - Parameter target: the name of the target being configured
|
||||
/// - Returns: a custom tracing configuration
|
||||
init(logLevel: LogLevel, currentTarget: String, filePrefix: String?) {
|
||||
fileName = if let filePrefix {
|
||||
"\(RustTracing.filePrefix)-\(filePrefix)"
|
||||
} else {
|
||||
RustTracing.filePrefix
|
||||
}
|
||||
|
||||
let overrides = Self.targets.keys.reduce(into: [Target: LogLevel]()) { partialResult, target in
|
||||
// Keep the defaults here
|
||||
let ignoredTargets: [Target] = [.hyper]
|
||||
|
||||
if ignoredTargets.contains(target) {
|
||||
return
|
||||
}
|
||||
|
||||
guard let defaultTargetLogLevel = Self.targets[target] else {
|
||||
return
|
||||
}
|
||||
|
||||
// Only change the targets that have default values
|
||||
// smaller than the desired log level
|
||||
if defaultTargetLogLevel < logLevel {
|
||||
partialResult[target] = logLevel
|
||||
}
|
||||
}
|
||||
|
||||
var newTargets = Self.targets
|
||||
for (target, logLevel) in overrides {
|
||||
newTargets.updateValue(logLevel, forKey: target)
|
||||
}
|
||||
|
||||
var components = newTargets.map { (target: Target, logLevel: LogLevel) in
|
||||
guard !target.rawValue.isEmpty else {
|
||||
return logLevel.rawValue
|
||||
}
|
||||
|
||||
return "\(target.rawValue)=\(logLevel.rawValue)"
|
||||
}
|
||||
|
||||
// With `common` not being used we manually need to specify the log
|
||||
// level for passed in targets
|
||||
components.append("\(currentTarget)=\(logLevel.rawValue)")
|
||||
|
||||
filter = components.joined(separator: ",")
|
||||
}
|
||||
}
|
@ -18,7 +18,7 @@ class LogViewerScreenViewModel: LogViewerScreenViewModelType, LogViewerScreenVie
|
||||
}
|
||||
|
||||
init() {
|
||||
super.init(initialViewState: LogViewerScreenViewState(urls: RustTracing.logFiles))
|
||||
super.init(initialViewState: LogViewerScreenViewState(urls: Tracing.logFiles))
|
||||
}
|
||||
|
||||
// MARK: - Public
|
||||
|
@ -41,7 +41,7 @@ enum DeveloperOptionsScreenViewAction {
|
||||
}
|
||||
|
||||
protocol DeveloperOptionsProtocol: AnyObject {
|
||||
var logLevel: TracingConfiguration.LogLevel { get set }
|
||||
var logLevel: LogLevel { get set }
|
||||
var slidingSyncDiscovery: AppSettings.SlidingSyncDiscovery { get set }
|
||||
var publicSearchEnabled: Bool { get set }
|
||||
var hideUnreadMessagesBadge: Bool { get set }
|
||||
|
@ -152,7 +152,7 @@ struct DeveloperOptionsScreen: View {
|
||||
}
|
||||
|
||||
private struct LogLevelConfigurationView: View {
|
||||
@Binding var logLevel: TracingConfiguration.LogLevel
|
||||
@Binding var logLevel: LogLevel
|
||||
|
||||
var body: some View {
|
||||
Picker(selection: $logLevel) {
|
||||
@ -166,7 +166,7 @@ private struct LogLevelConfigurationView: View {
|
||||
}
|
||||
|
||||
/// Allows the picker to work with associated values
|
||||
private var logLevels: [TracingConfiguration.LogLevel] {
|
||||
private var logLevels: [LogLevel] {
|
||||
[.error, .warn, .info, .debug, .trace]
|
||||
}
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ class BugReportService: NSObject, BugReportServiceProtocol {
|
||||
}
|
||||
|
||||
if bugReport.includeLogs {
|
||||
let logAttachments = await zipFiles(RustTracing.logFiles)
|
||||
let logAttachments = await zipFiles(Tracing.logFiles)
|
||||
for url in logAttachments.files {
|
||||
params.append(MultipartFormData(key: "compressed-log", type: .file(url: url)))
|
||||
}
|
||||
@ -163,8 +163,7 @@ class BugReportService: NSObject, BugReportServiceProtocol {
|
||||
MultipartFormData(key: "fallback_language", type: .text(value: Bundle.app.developmentLocalization ?? "null")),
|
||||
MultipartFormData(key: "local_time", type: .text(value: localTime)),
|
||||
MultipartFormData(key: "utc_time", type: .text(value: utcTime)),
|
||||
MultipartFormData(key: "base_bundle_identifier", type: .text(value: InfoPlistReader.main.baseBundleIdentifier)),
|
||||
MultipartFormData(key: "rust_tracing_filter", type: .text(value: RustTracing.currentTracingConfiguration?.filter ?? "null"))
|
||||
MultipartFormData(key: "base_bundle_identifier", type: .text(value: InfoPlistReader.main.baseBundleIdentifier))
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -15,12 +15,12 @@ class LoggingTests: XCTestCase {
|
||||
}
|
||||
|
||||
override func setUpWithError() throws {
|
||||
RustTracing.deleteLogFiles()
|
||||
Tracing.deleteLogFiles()
|
||||
}
|
||||
|
||||
func testLogging() async throws {
|
||||
let target = "tests"
|
||||
XCTAssertTrue(RustTracing.logFiles.isEmpty)
|
||||
XCTAssertTrue(Tracing.logFiles.isEmpty)
|
||||
|
||||
MXLog.configure(currentTarget: target, filePrefix: target, logLevel: .info)
|
||||
|
||||
@ -43,7 +43,7 @@ class LoggingTests: XCTestCase {
|
||||
|
||||
MXLog.info(infoLog)
|
||||
|
||||
guard let logFile = RustTracing.logFiles.first else {
|
||||
guard let logFile = Tracing.logFiles.first else {
|
||||
XCTFail(Constants.genericFailure)
|
||||
return
|
||||
}
|
||||
@ -55,7 +55,7 @@ class LoggingTests: XCTestCase {
|
||||
let verboseLog = UUID().uuidString
|
||||
|
||||
MXLog.verbose(verboseLog)
|
||||
guard let logFile = RustTracing.logFiles.first else {
|
||||
guard let logFile = Tracing.logFiles.first else {
|
||||
XCTFail(Constants.genericFailure)
|
||||
return
|
||||
}
|
||||
@ -65,7 +65,7 @@ class LoggingTests: XCTestCase {
|
||||
|
||||
func validateTargetName(_ target: String) throws {
|
||||
MXLog.info(UUID().uuidString)
|
||||
guard let logFile = RustTracing.logFiles.first else {
|
||||
guard let logFile = Tracing.logFiles.first else {
|
||||
XCTFail(Constants.genericFailure)
|
||||
return
|
||||
}
|
||||
@ -100,7 +100,7 @@ class LoggingTests: XCTestCase {
|
||||
MXLog.info(roomSummary)
|
||||
|
||||
// Then the log file should not include the sensitive information
|
||||
guard let logFile = RustTracing.logFiles.first else {
|
||||
guard let logFile = Tracing.logFiles.first else {
|
||||
XCTFail(Constants.genericFailure)
|
||||
return
|
||||
}
|
||||
@ -188,7 +188,7 @@ class LoggingTests: XCTestCase {
|
||||
MXLog.info(fileMessage)
|
||||
|
||||
// Then the log file should not include the text content
|
||||
guard let logFile = RustTracing.logFiles.first else {
|
||||
guard let logFile = Tracing.logFiles.first else {
|
||||
XCTFail(Constants.genericFailure)
|
||||
return
|
||||
}
|
||||
@ -255,7 +255,7 @@ class LoggingTests: XCTestCase {
|
||||
MXLog.info(rustFileMessage)
|
||||
|
||||
// Then the log file should not include the text content
|
||||
guard let logFile = RustTracing.logFiles.first else {
|
||||
guard let logFile = Tracing.logFiles.first else {
|
||||
XCTFail(Constants.genericFailure)
|
||||
return
|
||||
}
|
||||
@ -282,10 +282,10 @@ class LoggingTests: XCTestCase {
|
||||
|
||||
func testLogFileSorting() async throws {
|
||||
// Given a collection of log files.
|
||||
XCTAssertTrue(RustTracing.logFiles.isEmpty)
|
||||
XCTAssertTrue(Tracing.logFiles.isEmpty)
|
||||
|
||||
// When creating new logs.
|
||||
let logsFileDirectory = RustTracing.logsDirectory
|
||||
let logsFileDirectory = Tracing.logsDirectory
|
||||
for i in 1...5 {
|
||||
let filename = "console.\(i).log"
|
||||
try "console".write(to: logsFileDirectory.appending(path: filename), atomically: true, encoding: .utf8)
|
||||
@ -297,7 +297,7 @@ class LoggingTests: XCTestCase {
|
||||
}
|
||||
|
||||
// Then the logs should be sorted chronologically (newest first) and not alphabetically.
|
||||
XCTAssertEqual(RustTracing.logFiles.map(\.lastPathComponent),
|
||||
XCTAssertEqual(Tracing.logFiles.map(\.lastPathComponent),
|
||||
["console-nse.5.log",
|
||||
"console-nse.4.log",
|
||||
"console-nse.3.log",
|
||||
@ -317,7 +317,7 @@ class LoggingTests: XCTestCase {
|
||||
try fileHandle.close()
|
||||
|
||||
// Then that file should now be the first log file.
|
||||
XCTAssertEqual(RustTracing.logFiles.map(\.lastPathComponent),
|
||||
XCTAssertEqual(Tracing.logFiles.map(\.lastPathComponent),
|
||||
["console.1.log",
|
||||
"console-nse.5.log",
|
||||
"console-nse.4.log",
|
||||
|
@ -1,44 +0,0 @@
|
||||
//
|
||||
// Copyright 2022-2024 New Vector Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
|
||||
@testable import ElementX
|
||||
|
||||
class TracingConfigurationTests: XCTestCase {
|
||||
func testConfiguration() { // swiftlint:disable line_length
|
||||
var filter = TracingConfiguration(logLevel: .error, currentTarget: "tests", filePrefix: nil).filter
|
||||
|
||||
XCTAssertEqual(filter, "hyper=warn,matrix_sdk_ffi=info,matrix_sdk::client=trace,matrix_sdk_crypto=debug,matrix_sdk_crypto::olm::account=trace,matrix_sdk::oidc=trace,matrix_sdk::http_client=debug,matrix_sdk::sliding_sync=info,matrix_sdk_base::sliding_sync=info,matrix_sdk_ui::timeline=info,matrix_sdk::event_cache=info,matrix_sdk_sqlite::event_cache_store=info,tests=error")
|
||||
|
||||
filter = TracingConfiguration(logLevel: .warn, currentTarget: "tests", filePrefix: nil).filter
|
||||
|
||||
XCTAssertEqual(filter, "hyper=warn,matrix_sdk_ffi=info,matrix_sdk::client=trace,matrix_sdk_crypto=debug,matrix_sdk_crypto::olm::account=trace,matrix_sdk::oidc=trace,matrix_sdk::http_client=debug,matrix_sdk::sliding_sync=info,matrix_sdk_base::sliding_sync=info,matrix_sdk_ui::timeline=info,matrix_sdk::event_cache=info,matrix_sdk_sqlite::event_cache_store=info,tests=warn")
|
||||
|
||||
filter = TracingConfiguration(logLevel: .info, currentTarget: "tests", filePrefix: nil).filter
|
||||
|
||||
XCTAssertEqual(filter, "hyper=warn,matrix_sdk_ffi=info,matrix_sdk::client=trace,matrix_sdk_crypto=debug,matrix_sdk_crypto::olm::account=trace,matrix_sdk::oidc=trace,matrix_sdk::http_client=debug,matrix_sdk::sliding_sync=info,matrix_sdk_base::sliding_sync=info,matrix_sdk_ui::timeline=info,matrix_sdk::event_cache=info,matrix_sdk_sqlite::event_cache_store=info,tests=info")
|
||||
|
||||
filter = TracingConfiguration(logLevel: .debug, currentTarget: "tests", filePrefix: nil).filter
|
||||
|
||||
XCTAssertEqual(filter, "hyper=warn,matrix_sdk_ffi=debug,matrix_sdk::client=trace,matrix_sdk_crypto=debug,matrix_sdk_crypto::olm::account=trace,matrix_sdk::oidc=trace,matrix_sdk::http_client=debug,matrix_sdk::sliding_sync=debug,matrix_sdk_base::sliding_sync=debug,matrix_sdk_ui::timeline=debug,matrix_sdk::event_cache=debug,matrix_sdk_sqlite::event_cache_store=debug,tests=debug")
|
||||
|
||||
filter = TracingConfiguration(logLevel: .trace, currentTarget: "tests", filePrefix: nil).filter
|
||||
|
||||
XCTAssertEqual(filter, "hyper=warn,matrix_sdk_ffi=trace,matrix_sdk::client=trace,matrix_sdk_crypto=trace,matrix_sdk_crypto::olm::account=trace,matrix_sdk::oidc=trace,matrix_sdk::http_client=trace,matrix_sdk::sliding_sync=trace,matrix_sdk_base::sliding_sync=trace,matrix_sdk_ui::timeline=trace,matrix_sdk::event_cache=trace,matrix_sdk_sqlite::event_cache_store=trace,tests=trace")
|
||||
} // swiftlint:enable line_length
|
||||
|
||||
func testLevelOrdering() {
|
||||
var logLevels: [TracingConfiguration.LogLevel] = [.info, .error, .trace, .debug, .warn]
|
||||
|
||||
XCTAssertEqual(logLevels.sorted(), [.error, .warn, .info, .debug, .trace])
|
||||
|
||||
logLevels = [.warn, .error, .debug, .trace, .info, .error]
|
||||
|
||||
XCTAssertEqual(logLevels.sorted(), [.error, .error, .warn, .info, .debug, .trace])
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user