Conversation
Logger to use os_logLogger to use os_log
883a6c1 to
33b21a5
Compare
Logger to use os_logLogger to use os_log
Codecov Report
@@ Coverage Diff @@
## main #2608 +/- ##
==========================================
+ Coverage 86.31% 86.36% +0.05%
==========================================
Files 207 207
Lines 14540 14611 +71
==========================================
+ Hits 12550 12619 +69
- Misses 1990 1992 +2
|
NachoSoto
commented
Jun 15, 2023
| "\(level.description, privacy: .public)\(fileContext, privacy: .public): \(message, privacy: .public)" | ||
| ) | ||
| } else { | ||
| NSLog("%@", "[\(framework)] - \(level.description)\(fileContext): \(message)") |
Contributor
Author
There was a problem hiding this comment.
Codecov only looks at iOS 16: this is still used before iOS 14.0
NachoSoto
pushed a commit
that referenced
this pull request
Jun 22, 2023
**This is an automatic release.** ### Bugfixes * `PurchasesOrchestrator`: update `CustomerInfoManager` cache after processing transactions (#2676) via NachoSoto (@NachoSoto) * `ErrorResponse`: drastically improved error messages, no more "unknown error"s (#2660) via NachoSoto (@NachoSoto) * `PaywallExtensions`: post purchases with `Offering` identifier (#2645) via NachoSoto (@NachoSoto) * Support `product_plan_identifier` for purchased subscriptions from `Google Play` (#2654) via Josh Holtz (@joshdholtz) ### Performance Improvements * `copy(with: VerificationResult)`: optimization to avoid copies (#2639) via NachoSoto (@NachoSoto) ### Other Changes * `ETagManager`: refactored e-tag creation and tests (#2671) via NachoSoto (@NachoSoto) * `getPromotionalOffer`: return `ErrorCode.ineligibleError` if receipt is not found (#2678) via NachoSoto (@NachoSoto) * `TimingUtil`: removed slow purchase logs (#2677) via NachoSoto (@NachoSoto) * `CI`: changed `Codecov` to `informational` (#2670) via NachoSoto (@NachoSoto) * `LoadShedderIntegrationTests`: verify requests are actually handled by load shedder (#2663) via NachoSoto (@NachoSoto) * `ETagManager.httpResultFromCacheOrBackend`: return response headers (#2666) via NachoSoto (@NachoSoto) * `Integration Tests`: added tests to verify 304 behavior (#2659) via NachoSoto (@NachoSoto) * `HTTPClient`: disable `URLSession` cache (#2668) via NachoSoto (@NachoSoto) * Documented `HTTPStatusCode.isSuccessfullySynced` (#2661) via NachoSoto (@NachoSoto) * `NetworkError.signatureVerificationFailed`: added status code to error `userInfo` (#2657) via NachoSoto (@NachoSoto) * `HTTPClient`: improved log for failed requests (#2669) via NachoSoto (@NachoSoto) * `ETagManager`: added new verbose logs (#2656) via NachoSoto (@NachoSoto) * `Signature Verification`: added test-only log for debugging invalid signatures (#2658) via NachoSoto (@NachoSoto) * Fixed `HTTPResponse.description` (#2664) via NachoSoto (@NachoSoto) * Changed `Logger` to use `os_log` (#2608) via NachoSoto (@NachoSoto) * `MainThreadMonitor`: increased threshold (#2662) via NachoSoto (@NachoSoto) * `debugRevenueCatOverlay`: display `receiptURL` (#2652) via NachoSoto (@NachoSoto) * `PurchaseTester`: added ability to display `debugRevenueCatOverlay` (#2653) via NachoSoto (@NachoSoto) * `debugRevenueCatOverlay`: ability to close on `macOS`/`Catalyst` (#2649) via NachoSoto (@NachoSoto) * `debugRevenueCatOverlay`: added support for `macOS` (#2648) via NachoSoto (@NachoSoto) * `LoadShedderIntegrationTests`: enable signature verification (#2655) via NachoSoto (@NachoSoto) * `ImageSnapshot`: fixed Xcode 15 compilation (#2651) via NachoSoto (@NachoSoto) * `OfferingsManager`: don't clear offerings cache timestamp when request fails (#2359) via NachoSoto (@NachoSoto) * `StoreKitObserverModeIntegrationTests`: added test for posting renewals (#2590) via NachoSoto (@NachoSoto) * Always initialize `StoreKit2TransactionListener` even on SK1 mode (#2612) via NachoSoto (@NachoSoto) * `ErrorUtils.missingReceiptFileError`: added receipt URL `userInfo` context (#2650) via NachoSoto (@NachoSoto) * Added `.xcprivacy` for Xcode 15 (#2619) via NachoSoto (@NachoSoto) * `Trusted Entitlements`: added debug log with `ResponseVerificationMode` (#2647) via NachoSoto (@NachoSoto) * `debugRevenueCatOverlay`: simplified title (#2641) via NachoSoto (@NachoSoto) * Simplified `Purchases.updateAllCachesIfNeeded` (#2626) via NachoSoto (@NachoSoto) * `HTTPResponseTests`: fixed disabled test (#2643) via NachoSoto (@NachoSoto) * Add `InternalDangerousSettings.forceSignatureFailures` (#2635) via NachoSoto (@NachoSoto) * `IntegrationTests`: explicit `StoreKit 1` mode (#2636) via NachoSoto (@NachoSoto) * `Signing`: removed API for loading key from a file (#2638) via NachoSoto (@NachoSoto)
NachoSoto
added a commit
that referenced
this pull request
Jun 23, 2023
`Purchases.verboseLogHandler` changed in #2608 with the introduction of a new `internalLogHandler`. Restoring the log handler doing `Purchases.verboseLogHandler = Purchases.verboseLogHandler` now loses the message category. We didn't have test coverage for `Purchases.logHandler` either which this adds as well. This also fixes tests in RevenueCat/purchases-hybrid-common#435
NachoSoto
added a commit
that referenced
this pull request
Jun 26, 2023
`Purchases.verboseLogHandler` changed in #2608 with the introduction of a new `internalLogHandler`. Restoring the log handler doing `Purchases.verboseLogHandler = Purchases.verboseLogHandler` now loses the message category. We didn't have test coverage for `Purchases.logHandler` either which this adds as well. This also fixes tests in RevenueCat/purchases-hybrid-common#435
12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes SDK-3173.
Motivation
os_log(and the newLogger.log) is the canonical way of logging in Apple platforms, replacing the oldNSLog. This was made even more useful with the updates to log printing in Xcode 15.Additionally, this allows us in the future to log
OSLogMessage(usingOSLogInterpolation), and therefore being able to mark certain parts of logs asprivacy: .private.Changes:
LogMessageto ensure every logged message has acategoryLoggerStoreto abstractos.LoggercreationLoggerto useos.Loggerif available (defaulting to the oldNSLogotherwise)LogMessageinstances (same as Refactor: extracted all log strings #2600)With these new categories, log provide extra context. Example
These also look much better on Xcode 15:


And even allow users to filter out specific categories: