Skip to content

Commit

Permalink
Fix infinite recursion when enabling .graphAPIDebugInfo logging beh…
Browse files Browse the repository at this point in the history
…avior (#2245)

Summary:
Thanks for proposing a pull request!

To help us review the request, please complete the following:

- [x] sign [contributor license agreement](https://code.facebook.com/cla)
- [x] I've ensured that all existing tests pass and added tests (when/where necessary)
- [x] I've updated the documentation (when/where necessary) and [Changelog](CHANGELOG.md) (when/where necessary)
- [ ] I've added the proper label to this pull request (e.g. `bug` for bug fixes)

## Pull Request Details

Fixes #2152.

Pull Request resolved: #2245

Reviewed By: ryantobinmeta

Differential Revision: D59592803

Pulled By: Zhiyi-Zhang

fbshipit-source-id: 3f85117961ec4342b64f83f0d9e93f170afcc7ae
  • Loading branch information
revolter authored and facebook-github-bot committed Jul 10, 2024
1 parent 707447b commit e905cac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

## Unreleased

- Fix infinite recursion when enabling `.graphAPIDebugInfo` logging behavior.

[Full Changelog](https://github.com/facebook/facebook-ios-sdk/compare/v17.0.2...HEAD)

## 17.0.2
Expand Down
2 changes: 1 addition & 1 deletion FBSDKCoreKit/FBSDKCoreKit/Settings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ public final class Settings: NSObject, SettingsProtocol, SettingsLogging, _Clien

private func updateGraphAPIDebugBehavior() {
// Enable warnings every time info is enabled
if loggingBehaviors.contains(.graphAPIDebugInfo) {
if loggingBehaviors.contains(.graphAPIDebugInfo), !loggingBehaviors.contains(.graphAPIDebugWarning) {
loggingBehaviors.insert(.graphAPIDebugWarning)
}
}
Expand Down

0 comments on commit e905cac

Please sign in to comment.