In the end goal I would like to fetch the logs programmatically, and then grabbing the content of logs for some analysis.
I wonder if it is enough to use
sudo log collect --predicate 'process == "com.example.myapp"' --device-udid 83yiphoneuuid464946464