Skip to content

[Swift] Canonicalize LogLevel to debug/warn/error/none#441

Merged
markmur merged 1 commit into
mainfrom
swift-canonical-log-levels
Jul 14, 2026
Merged

[Swift] Canonicalize LogLevel to debug/warn/error/none#441
markmur merged 1 commit into
mainfrom
swift-canonical-log-levels

Conversation

@markmur

@markmur markmur commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

What

Canonicalizes LogLevel to an ordered, threshold-based set: debug, warn, error, none.

  • debug is the most verbose; none silences everything.
  • Selecting a level emits that level and every more-severe level.
  • Drops the old .all case (breaking) and adds .warn plus OSLogger.warn(_:).
  • Default is now .warn (was .error), aligning Swift with the other platforms.

Previously the filter matched the level exactly, so .debug silenced errors and faults. The ordered comparison fixes that.

Threshold

logLevel debug warn error
.debug
.warn (default)
.error
.none

Usage

var configuration = Configuration()

configuration.logLevel = .debug   // debug + warnings + errors
configuration.logLevel = .warn    // warnings + errors (default)
configuration.logLevel = .error   // errors only
configuration.logLevel = .none    // silence everything

@github-actions github-actions Bot added the #gsd:50662 Rebase Checkout Kit on UCP label Jul 13, 2026

markmur commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown

React Native — Coverage Report

Lines Statements Branches Functions
Coverage: 92%
91.85% (327/356) 87.98% (183/208) 100% (86/86)

@markmur markmur self-assigned this Jul 13, 2026
@markmur
markmur force-pushed the swift-canonical-log-levels branch from 20ac9d3 to 5d262ec Compare July 14, 2026 08:22
@markmur
markmur force-pushed the kotlin-decode-error-parity branch from 4775200 to 3b8b1e8 Compare July 14, 2026 08:22
@markmur
markmur force-pushed the swift-canonical-log-levels branch from 5d262ec to 9052ad2 Compare July 14, 2026 08:48
@markmur
markmur force-pushed the kotlin-decode-error-parity branch from 3b8b1e8 to acda492 Compare July 14, 2026 08:48
@markmur
markmur force-pushed the swift-canonical-log-levels branch from 9052ad2 to d825200 Compare July 14, 2026 08:59
@markmur
markmur force-pushed the kotlin-decode-error-parity branch from acda492 to d0e4451 Compare July 14, 2026 08:59
@markmur
markmur force-pushed the swift-canonical-log-levels branch from d825200 to abd1ba4 Compare July 14, 2026 10:03
@markmur
markmur force-pushed the kotlin-decode-error-parity branch from d0e4451 to 1e6dca2 Compare July 14, 2026 10:03

markmur commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

  • Jul 14, 11:14 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jul 14, 11:16 AM UTC: Graphite rebased this pull request as part of a merge.
  • Jul 14, 11:33 AM UTC: @markmur merged this pull request with Graphite.

@markmur
markmur changed the base branch from kotlin-decode-error-parity to graphite-base/441 July 14, 2026 11:14
@markmur
markmur changed the base branch from graphite-base/441 to main July 14, 2026 11:14
Replace the exact-match filter with threshold (ordered) severity:
debug is most verbose, none silences everything. Fixes the bug where
selecting .debug silenced errors and faults.

Drop the .all case (breaking) and add a warn level plus warn() method.
Migrate tests, samples, and README to the new set.
@markmur
markmur force-pushed the swift-canonical-log-levels branch from abd1ba4 to e01e33b Compare July 14, 2026 11:15
@markmur
markmur merged commit c8fda2f into main Jul 14, 2026
32 checks passed
@markmur
markmur deleted the swift-canonical-log-levels branch July 14, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

#gsd:50662 Rebase Checkout Kit on UCP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants