1.3.0
版本发布时间: 2020-07-07 11:44:44
apple/swift-log最新发布版本:1.6.1(2024-06-25 01:37:08)
Highlights
LogHandler
implementations should take care adjust their implementations moving forward to implement the following log
function:
func log(
level: Logging.Logger.Level,
message: Logging.Logger.Message,
metadata: Logging.Logger.Metadata?,
source: String, // new (!)
file: String, function: String, line: UInt
)
rather than the previous function:
func log(
level: Logging.Logger.Level,
message: Logging.Logger.Message,
metadata: Logging.Logger.Metadata?,
file: String, function: String, line: UInt
)
Compatibility shims are provided and existing implementations will continue to work as-is. However in order to reap benefits of the new source
(which will contain the "module name from which this log message originates") parameter, they will have to change which log
overload they implement. We suggest moving to implementing the new overload (with source:
) as soon as possible, allowing the logging ecosystem to make use of this new capability.
For details see:
- Add "source" for log messages https://github.com/apple/swift-log/pull/135
SemVer Minor
- Add "source" for log messages https://github.com/apple/swift-log/pull/135
- Add NoOpLogHandler for when you don't want logging https://github.com/apple/swift-log/pull/142
- Logging: port to Windows https://github.com/apple/swift-log/pull/118
- =multiplex #139 more properly handle logLevel in multiplex handler https://github.com/apple/swift-log/pull/140
- Note that previous behavior of the
MultiplexLogHandler
was very surprising and this change makes it more consistent, see the PR for details if you are using multiplex handlers
- Note that previous behavior of the
SemVer Patch
- silence #file to #filePath warnings https://github.com/apple/swift-log/pull/133
- a number of readme and docs improvements:
- docs: =doc #82 avoid showcasing internal lock in public docs https://github.com/apple/swift-log/pull/144
- Fix doc typo #134
- Add more syntax highlighting to the readme file #114
- and more, see the 1.3.0 milestone for all closed issues.
Credits
This release includes 15 issues/PRs, which were made possible with the help of 18 contributors 🎉
We would like to thank all everyone for their feedback and contributions:
Tomer Doron, Johannes Weiss, Konrad ktoso
Malawski, Saleem Abdulrasool, Gwynne Raskind, prafsoni, Adam Fowler, Neal Lester, Artur Dryomov, Franz Busch, Shiva Huang, zach wick, Ravi Kandhadai, YR Chen, Jeremy Greenwood, Will Lisac, Mattt, Tanner
Thank you!