Skip to content

Update documentation to reflect recent changes#445

Open
samuelmurray wants to merge 3 commits intoapple:mainfrom
samuelmurray:update-documentation
Open

Update documentation to reflect recent changes#445
samuelmurray wants to merge 3 commits intoapple: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
Copy link
Copy Markdown
Contributor

@kukushechkin kukushechkin left a comment

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
Copy link
Copy Markdown
Contributor

heckj commented Apr 16, 2026

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.

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