@@ -238,7 +238,7 @@ public actor MLSActionExecutor: MLSActionExecutorProtocol {
238238 public func addMembers( _ invitees: [ WireDataModel . KeyPackage ] , to groupID: MLSGroupID ) async throws {
239239 try await performNonReentrant ( groupID: groupID) {
240240 do {
241- WireLogger . mls. info ( " adding members to group ( \( groupID . safeForLoggingDescription ) )... " )
241+ WireLogger . mls. info ( " adding members to group... " , attributes : groupID . safeAttributes )
242242
243243 let crlNewDistributionPoints = try await coreCrypto. perform {
244244 try await $0. addClientsToConversation (
@@ -253,11 +253,11 @@ public actor MLSActionExecutor: MLSActionExecutorProtocol {
253253 onNewCRLsDistributionPointsSubject. send ( newDistributionPoints)
254254 }
255255
256- WireLogger . mls. info ( " success: adding members to group ( \( groupID. safeForLoggingDescription ) ) " )
256+ WireLogger . mls. info ( " success: adding members to group " , attributes : groupID. safeAttributes )
257257 } catch {
258258 WireLogger . mls
259259 . info (
260- " failed: adding members to group ( \( groupID . safeForLoggingDescription ) ) : \( String ( describing: error) ) "
260+ " failed: adding members to group: \( String ( describing: error) ) " , attributes : groupID . safeAttributes
261261 )
262262 throw error
263263 }
@@ -267,7 +267,7 @@ public actor MLSActionExecutor: MLSActionExecutorProtocol {
267267 public func removeClients( _ clients: [ ClientId ] , from groupID: MLSGroupID ) async throws {
268268 try await performNonReentrant ( groupID: groupID) {
269269 do {
270- WireLogger . mls. info ( " removing clients from group ( \( groupID . safeForLoggingDescription ) )... " )
270+ WireLogger . mls. info ( " removing clients from group... " , attributes : groupID . safeAttributes )
271271 return try await coreCrypto. perform {
272272 try await $0. removeClientsFromConversation (
273273 conversationId: groupID. conversationId,
@@ -277,7 +277,7 @@ public actor MLSActionExecutor: MLSActionExecutorProtocol {
277277 } catch {
278278 WireLogger . mls
279279 . info (
280- " error: removing clients from group ( \( groupID . safeForLoggingDescription ) ) : \( String ( describing: error) ) "
280+ " error: removing clients from group: \( String ( describing: error) ) " , attributes : groupID . safeAttributes
281281 )
282282 throw error
283283 }
@@ -287,14 +287,14 @@ public actor MLSActionExecutor: MLSActionExecutorProtocol {
287287 public func updateKeyMaterial( for groupID: MLSGroupID ) async throws {
288288 try await performNonReentrant ( groupID: groupID) {
289289 do {
290- WireLogger . mls. info ( " updating key material for group ( \( groupID . safeForLoggingDescription ) )... " )
290+ WireLogger . mls. info ( " updating key material for group... " , attributes : groupID . safeAttributes )
291291 return try await coreCrypto. perform {
292292 try await $0. updateKeyingMaterial ( conversationId: groupID. conversationId)
293293 }
294294 } catch {
295295 WireLogger . mls
296296 . info (
297- " error: updating key material for group ( \( groupID . safeForLoggingDescription ) ) : \( String ( describing: error) ) "
297+ " error: updating key material for group: \( String ( describing: error) ) " , attributes : groupID . safeAttributes
298298 )
299299 throw error
300300 }
@@ -304,16 +304,16 @@ public actor MLSActionExecutor: MLSActionExecutorProtocol {
304304 public func commitPendingProposals( in groupID: MLSGroupID ) async throws {
305305 try await performNonReentrant ( groupID: groupID) {
306306 do {
307- WireLogger . mls. info ( " committing pending proposals for group ( \( groupID. safeForLoggingDescription ) )... " )
307+ WireLogger . mls. info ( " committing pending proposals for group " , attributes : groupID. safeAttributes )
308308 try await coreCrypto. perform {
309309 try await $0. commitPendingProposals ( conversationId: groupID. conversationId)
310310 }
311311 WireLogger . mls
312- . info ( " success: committing pending proposals for group ( \( groupID. safeForLoggingDescription ) ) " )
312+ . info ( " success: committing pending proposals for group " , attributes : groupID. safeAttributes )
313313 } catch {
314314 WireLogger . mls
315315 . info (
316- " error: committing pending proposals for group ( \( groupID . safeForLoggingDescription ) ) : \( String ( describing: error) ) "
316+ " error: committing pending proposals for group: \( String ( describing: error) ) " , attributes : groupID . safeAttributes
317317 )
318318 throw error
319319 }
@@ -323,7 +323,7 @@ public actor MLSActionExecutor: MLSActionExecutorProtocol {
323323 public func joinGroup( _ groupID: MLSGroupID , groupInfo: Data ) async throws {
324324 try await performNonReentrant ( groupID: groupID) {
325325 do {
326- WireLogger . mls. info ( " joining group ( \( groupID . safeForLoggingDescription ) ) via external commit" )
326+ WireLogger . mls. info ( " joining group via external commit " , attributes : groupID . safeAttributes )
327327 let ciphersuite = await featureRepository. fetchMLS ( ) . config. defaultCipherSuite. coreCryptoCipherSuite
328328 let conversationInitBundle = try await coreCrypto. perform {
329329 let e2eiIsEnabled = try await $0. e2eiIsEnabled ( ciphersuite: ciphersuite)
@@ -338,11 +338,11 @@ public actor MLSActionExecutor: MLSActionExecutorProtocol {
338338 ) {
339339 onNewCRLsDistributionPointsSubject. send ( newDistributionPoints)
340340 }
341- WireLogger . mls. info ( " success: joining group ( \( groupID . safeForLoggingDescription ) ) via external commit" )
341+ WireLogger . mls. info ( " success: joining group via external commit " , attributes : groupID . safeAttributes )
342342 } catch {
343343 WireLogger . mls
344344 . info (
345- " error: joining group ( \( groupID . safeForLoggingDescription ) ) via external commit: \( String ( describing: error) ) "
345+ " error: joining group via external commit: \( String ( describing: error) ) " , attributes : groupID . safeAttributes
346346 )
347347 throw error
348348 }
@@ -418,3 +418,9 @@ extension MLSActionExecutor.Action: CustomDebugStringConvertible {
418418 }
419419
420420}
421+
422+ private extension MLSGroupID {
423+ var safeAttributes : LogAttributes {
424+ [ . mlsGroupID: self . safeForLoggingDescription, . public: true ]
425+ }
426+ }
0 commit comments