SwiftLog 1.0.0 🛳


(Johannes Weiss) #1

SwiftLog 1.0.0

I'm thrilled to announce that SwiftLog 1.0.0 has finally shipped! Thank you so much everybody for your input during the design stages and your contributions to the repository. If you want to dive straight in, check out the API docs.

As you might have seen, SwiftLog recently entered the sandbox level in the SSWG incubation process, after that we kicked off the OSS project, and now it's ready for use.

What does it do and what does it not do?

The goal for SwiftLog is to become the standard API for the Swift on Server ecosystem that provides the glue so that great applications and libraries have a unified way of logging. However, the only functionality that SwiftLog itself provides is the API that can be used to log messages. So called 'logging backends' will deliver all the useful functionality such as output colourful messages, ship the messages off to ELK/Splunk/a file/a database/... . The great news for you is that you can start using SwiftLog today and as soon as a great SwiftLog compatible logging backend is created you can just select it with SwiftLog. Once selected your application as well as the libraries you link will start logging in your preferred format, to your preferred destination.

Of course, we all need to work together and create great logging backends. We believe this is an important step to continue the path of improved production readiness. And this journey doesn't stop after we have a great logging solution, a similar effort for metrics is already underway!

What about the version number (1.0.0)?

So how come it's sandbox and 1.0.0 already? SwiftPM works best with SemVer which allows the ecosystem to scale because the digits in the version number have real meaning, aiming to prevent 'versioning hell'.
The only actual meaning of "1.0.0" is that we now follow SemVer. That means: If we just make a bug fix, we'll increment the last digit (for example 1.0.1), purely additive changes increment the middle version number (for example 1.1.0), and breaking changes increment the first version number (for example 2.0.0). For you that means that you mostly shouldn't care about anything but real breaking changes. So for the ecosystem's sake, please use

.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"),

What about Swift 4 support?

We are working on a mostly compatible version for Swift 4 that we will tag 0.x so you can start using SwiftLog even before you can drop Swift 4 support. Stay tuned on that.