SDK-6118: Verbose Console Logs - #65
Draft
akashvercetti wants to merge 2 commits into
Draft
Conversation
[SDK-6090] Release v1.5.1
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Contributor
Author
|
@coderabbitai review |
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.
Logging setup
New
CTContentLogclass. Usesos_logwith subsystem com.clevertap.sdk.Always on. No setting to turn it on or off.
Every line uses level .default. That level is saved to disk. A client can send us the log after a bug.
Every line shows the file and method it came from.
Checked that the lines survive in a stripped Release build. SPM users get them too.
Extension startup
First line logs that the extension started. No lines at all means it never ran.
Logs the notification id and all payload keys.
Logs which template was picked, and why.
Logs when pt_id is missing, unknown, or the wrong type.
Logs when pt_json is missing or wrong. Logs when we rebuild it from flat keys.
Logs a size of zero. That is why the expanded view shows up blank.
Logs a memory warning. The system stops the extension soon after one.
Logs the response option by name, not as a number.
New payload check like Android Push templates
Runs before any drawing or download.
Names every missing key in one line. Says what the user will see.
Covers basic, both carousels, timer, zero bezel, web view, rating, vertical image.
Images
Logs the start, the size, the byte count, and the time taken.
Logs each failure on its own: bad url, network error, bad status, empty body, decode failure.
Added a 10 second timeout. The old 60 second one was longer than the extension lives. A slow download killed the process with no log.
Templates
Carousel: image count, skipped slides, page index, deeplink taps.
Timer: which key set the deadline, and its values.
WebView: page load start, failure, and finish.
All other templates: missing images and caption-only fallbacks.
Fixes, not only logs
A payload value of the wrong type no longer stops the decode.
Empty view lists and decode failures now have handling.
Docs
README has the log stream command.
README warns that Console.app hides these lines under Errors and Faults.
@coderabbitai