Skip to content

Conversation

laevandus
Copy link
Contributor

🔗 Issue Links

Resolves: IOS-1160

🎯 Goal

Make Logger thread-safe because it sometimes crashes tests in Feeds

📝 Summary

🛠 Implementation

🎨 Showcase

🧪 Manual Testing Notes

☑️ Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change should be manually QAed
  • Changelog is updated with client-facing changes
  • Changelog is updated with new localization keys
  • New code is covered by unit tests
  • Documentation has been updated in the docs-content repo

@laevandus laevandus requested a review from a team as a code owner September 24, 2025 08:08
@laevandus laevandus added the 🐞 Bug An issue or PR related to a bug label Sep 24, 2025
@@ -0,0 +1,147 @@
//
// Logger_Tests.swift
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the header here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woah, linter also did not catch it. Added a template as well.

Copy link
Contributor

@martinmitrevski martinmitrevski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but there are some linter errors as well.

var destinationTypes: [LogDestination.Type] = LogConfig.defaultDestinations
}

static let configuration = AllocatedUnfairLock<Configuration>(Configuration())

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shall we make this one private?

}

public enum LogConfig {
struct Configuration {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having Configuration inside LogConfig sounds confusing. Shall we make it State?

@laevandus laevandus merged commit 7ca9270 into develop Sep 26, 2025
4 checks passed
@laevandus laevandus deleted the thread-safe-logger branch September 26, 2025 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Bug An issue or PR related to a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants