Rename LogLevel.warn to warning and add LogLevel.silent#111
Merged
tomas-martins-crossmint merged 8 commits intoJun 29, 2026
Conversation
Contributor
Prompt To Fix All With AIFix the following 2 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 2
Sources/CrossmintClient/Configuration.swift:7-15
**Documentation example references non-existent API**
The doc comment shows `CrossmintSDK.configure(with: Configuration(...))`, but no such overload exists in `CrossmintSDK.swift` — only `configure(apiKey:logLevel:)` is available. Any user who copies this example will get a compile error. Since `Configuration` is exported as `public`, this will appear in Xcode quick-help immediately after merging. The doc comment should either be removed/updated to reflect the current API, or the corresponding `configure(with:)` overload should be added in this PR.
### Issue 2 of 2
Sources/Logger/Remote/DataDogLoggerProvider.swift:284-285
**Dead `.none` case silently falls back to `"info"`**
`write(level:)` is private and is only ever called from the four `nonisolated func debug/info/warning/error` methods, so `.none` can never actually reach `mapLevelToStatus`. However, the exhaustive switch is still required, and mapping `.none` to `"info"` is a slightly surprising default. A more defensive choice that makes intent obvious is to use `"none"` so that any future code path that accidentally passes `.none` here is immediately visible.
```suggestion
case .none:
return "none"
```
Reviews (1): Last reviewed commit: "Remove Configuration struct — out of sco..." | Re-trigger Greptile |
Contributor
|
Reviews (2): Last reviewed commit: "Remove DocC comment from LogLevel.none" | Re-trigger Greptile |
Contributor
|
Reviews (3): Last reviewed commit: "Move log level filtering to OSLoggerProv..." | Re-trigger Greptile |
Contributor
|
Reviews (4): Last reviewed commit: "Rename LogLevel.none to silent" | Re-trigger Greptile |
5ea2508 to
0ff88eb
Compare
Contributor
|
Reviews (5): Last reviewed commit: "Rename warn to warning in CrossmintTEE (..." | Re-trigger Greptile |
…uration struct (WAL-9980)
0ff88eb to
2baa3fd
Compare
Contributor
|
Reviews (6): Last reviewed commit: "Rename warn to warning in CrossmintTEE (..." | Re-trigger Greptile |
afeight
approved these changes
Jun 29, 2026
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.
LogLevelhad awarncase instead ofwarning, and no way to silence console output entirely.Note:
warningdiverges from other SDKs, which usewarn. This is intentional — it matches Kotlin and the EDD.Changes
LogLevel.warntoLogLevel.warningacross the entire Logger stack: the protocol, both providers (OSLog and DataDog), and every call site in the SDKLogLevel.silent— sits above.errorin raw value order, suppressing all console output. DataDog is unaffected and always receives logs regardless of the configured levelLoggerintoOSLoggerProviderso that remote logging is never silenced by the level config, matching the behavior of the Kotlin and TS SDKsLoggerTeststarget with tests covering the new filtering behavior: that remote providers always receive logs, and that console providers respect the configured level