OS_log shows as private when its set to public

When using os_log in the following way


os_log("Response %{PUBLIC}@", log: OSLog.auditupload, type: .default, task.response ?? "No response")


Console reports it as the following default 12:50:38.985797 +0100 AssetStockCheckIOS Response <private>


I Expected to be able to see the response in the log. This is when the iPad is not in debug mode but running a release build of the App.


Is there a way to make this work ? i have tried log types of .info and .default


Thanks

Andy

Replies

Also note that the log line previous


os_log("Response Code %{PUBLIC}d", log: OSLog.auditupload, type: .default, responseCode)


default12:50:38.985251 +0100AssetStockCheckIOS Response Code 500


This still works fine

The

public
and
private
modifiers are usually specified in lower case (as shown by the examples in the
os_log
man page). Please try that.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"