SwiftLog + StringInterpolation

To be honest I'm not 100% sure if I'm posting this in the right place so apologies if not and please do let me know.

That being said, I love the SwiftLog library but as an app's developer I also love the API ergonomics of the recent OSLog inclusion of StringInterpolation.

To that end, I've copied over Apple's implementation into my own repo and added in a very similar API – albeit not with the same performance characteristics.

I wondered if this could be added/mentioned on the official SwiftLog README as I think it could be extremely useful for many other app developers.


Great work! I would expect it to be pitched directly into apple/swift-log if you’re willing to do so.

1 Like

I've requested some similar things in the past, and the maintainer team (and SSWG) has stated - which I actually agree with - that this should be left to a higher-level library to provide this functionality.

On Apple platforms, that's what os.Logger is - the higher level abstraction over Logging.Logger.

Unless you really need access to the lower level internals, which should be documented why and possibly contributed to provide extension hooks to LoggingSystem, this can and should be a separate library for users to pull in.

SwiftLog itself is intended to be more an "API currency" library, much like Sendable, Identifiable, etc. are in the Swift Standard Library.


As @Mordil has mentioned its not really a good fit. I did actually speak with one of the maintainers myself and we came to a similar conclusion. Thanks anyway ;)

Terms of Service

Privacy Policy

Cookie Policy