Skip to content

Update documentation to reflect recent changes#445

Merged
kukushechkin merged 3 commits into
apple:mainfrom
samuelmurray:update-documentation
Apr 17, 2026
Merged

Update documentation to reflect recent changes#445
kukushechkin merged 3 commits into
apple:mainfrom
samuelmurray:update-documentation

Conversation

@samuelmurray

Copy link
Copy Markdown
Contributor

Update documentation to reflect recent changes

Motivation:

The documentation was not updated in SLG-0003 or SLG-0005. Concretely, the examples given in the documentation used the now deprecated multiparameter methods in LogHandler, and the new LogEvent-based method were not listed among the others. Likewise, the new logging methods (Logger.trace etc.) that take an Error as a parameter were not added. Lastly, LogEvent had no separate entry.
While the default rendered docs for these were acceptable, it decreased the discoverability of the new methods, and the examples using deprecated methods were misleading.

Modifications:

  • Update all code examples to use non-deprecated methods.
  • List all new methods on Logger and LogHandler along the existing ones.
  • Add a minimal file for LogEvent to give it the same look as all other types.
  • Update code examples in .md files to follow swift format.

Result:

Documentation reflects the current state and best practices of swift-log.

@kukushechkin kukushechkin added the semver/none No version bump required. label Apr 16, 2026

@kukushechkin kukushechkin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this documentation update, @samuelmurray!

Comment thread Sources/Logging/Docs.docc/ImplementingALogHandler.md Outdated
@kukushechkin kukushechkin requested a review from heckj April 16, 2026 09:22
@kukushechkin kukushechkin enabled auto-merge (squash) April 16, 2026 14:10
@kukushechkin kukushechkin disabled auto-merge April 16, 2026 14:10
Co-authored-by: Vladimir Kukushkin <kukushechkin@mac.com>
@kukushechkin kukushechkin enabled auto-merge (squash) April 16, 2026 15:41
@heckj

heckj commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

An additional thank you @samuelmurray - on top of @kukushechkin ! Appreciate you taking the time with this!

Comment thread Sources/Logging/Docs.docc/Reference/LogEvent.md
@kukushechkin

Copy link
Copy Markdown
Contributor

FYI, the CI is in shambles (not only in this repo), there is nothing wrong with the PR.

auto-merge was automatically disabled April 16, 2026 20:15

Head branch was pushed to by a user without write access

@samuelmurray

Copy link
Copy Markdown
Contributor Author

After looking at the documentation at swiftpackageindex, I realised that the InMemoryLogging target is missing. When building the documentation in Xcode, I get both target, but perhaps swiftpackageindex requires a .docc catalog?
Anyway, I could add a minimal documentation for that target as well, either in this PR or in a separate one.

@heckj

heckj commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

@samuelmurray the lack of those other catalogs in SPI is a result of the configuration in .spi.yaml, which currently (as I'm writing this) reads:

version: 1
builder:
  configs:
    - documentation_targets: [Logging]

Which intentionally only builds the docs for the primary Logging. A catalog for InMemoryLogging would definitely help organize things, so it'd be a lovely follow up add - along with an update to the .spi.yaml to add it into Swift Package Index's set that it builds and presents

@kukushechkin kukushechkin merged commit 8ba97a9 into apple:main Apr 17, 2026
57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver/none No version bump required.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants