I'm in the process of implementing logging in my app using the new os.log API's from iOS 14 / macOS 11.
I've just noticed that we have more choice when it comes to the privacy of the included variables in our logs. There are the classic public and private, but there's also auto and sensitive. The documentation for the sensitive case says that "this option behaves identically to the private option". So why should we use it and what are its benefits?
Logger.auth.log(level: .debug, "Signed request \(String(describing: request.url), privacy: .sensitive)")
(Logger.auth is an extension on Logger in my project which just declares a new static logger object. See this blog post for more informations.)