The support window is 3 latest minor Swift versions. CI i already
running for Swift 6.2, 6.3 and 6.4 only. Updating the Swift tools and
the package to match this.
Add CMake build instructions for macOS, Windows and Linux including
requirements and installation steps.
### Motivation:
Document how to build SwiftLog with CMake for projects that use mixed
build systems and need integration outside of Swift Package Manager.
### Modifications:
- Added a new “Building with CMake” section to `README.md`
- Documented minimum requirements:
- Swift 6.1+
- CMake 3.19+
- Ninja 1.10+
- Added macOS build examples for both Xcode and Ninja generators
- Added Windows build instructions using Ninja
- Added install instructions and notes about shared vs. static builds
- Clarified that tests are not included in the CMake build and are still
managed through Swift Package Manager
### Result:
Users now have platform-specific guidance for building SwiftLog with
CMake on macOS, Windows and Linux.
Fixes#492
Unify repos layout across the ecosystem:
1. Remove `CONTRIBUTORS.md` and mentions of it.
2. Remove `CODE_OF_CONDUCT.md` and mentions of it.
3. From `CONTRIBUTING.md` remove "Writing a Patch" and "Commit Message
Template" sections.
4. Remove `.mailmap` and mentions of it.
5. Remove `dev/git.commit.template` and mentions of it.
6. Remove `SECURITY.md`, if it is referenced somewhere, change it to
reference to the org security file
"https://github.com/apple/swift-log?tab=security-ov-file".
7. Remove copyright header from `Package.swift` and version-specific
package manifests.
8. Add SPI shields to the `README.md`.
9. Add "How to contribute your work" section in `CONTRIBUTING.md`.
10. Add "Add Automated release process" section in `CONTRIBUTING.md`.
# Motivation
`SwiftLog` was created before DocC existed which meant that most of the
documentation was part of the `README` and we had a pretty bare bones
documentation catalog. We also have a second source of guidelines from
the SSWG. This results in a currently unsatisfying developer experience
where everyone has to go around looking for the content in mostly
undocumented places.
# Modifications
This PR overhauls the `README` and moves most of the content into the
documentation catalog. It also introduces a new section called "Best
practices" that are intended to replace the logging guides on swift.org
so that the content moves closer to where it belongs. To showcase such a
best practice this PR brings over the log level recommendation of
swift.org. The recommendation is mostly the same except that after
recent discussions we wanted to allow libraries to log at `info` level
when they encounter problems which they can't communicate through other
channels e.g. by throwing from a method.
# Result
With this PR we provide a nicer experience to our developers making it
easier for them to get started and understand how to properly log. We
also set ourselves up for expanding on the best practices around
logging.
systemd-based log integration
### Motivation:
Using native backend for storing log data
### Modifications:
Add swift-log-systemd to the list of available backends
### Result:
Another one option to use the package with
The README file links to an implementation of a backend that uses os_log.
However, the backend always uses `%{public}@` as the format string and
eagerly converts all string interpolations to Strings. This has two drawbacks:
1. the static components of the string interpolation would be eagerly copied by
the unified logging system, which will result in loss of performance.
2. It also changes the default privacy scheme used by os_log and make all message
private, which runs the risk of no message getting logged. Update the
README to capture this drawback. Also, link to the on-going effort on
improving os_log Swift APIs and aligning it with swift-log.