Collection of Unified Logs on macOS systems is pretty straight forward. You can use the command, and yes – you do have to be root.
sudo log collect
Collection from iOS device is not as obvious. I think most of us are doing the sysdiagnose/AirDrop method which is tricky. Trying to trigger a sysdiagnose on an iOS device can be frustrating to get the right button hits with the right timing. (Not completely unlike trying to get a device in DFU mode!)
In my recent testing, I noticed the argument–device-udid in ‘log’ man page. This functionality seems to have made an appearance in 10.15. The following also appeared
-
–device-name – The device name, ie: “Elwood’s iPhone”
-
–device – “First device found”. I guess I would consider this the #YOLO option. 🤷🏻♀️
This argument has been super handy in recent testing to bypass the frustration of sysdiagnose on iOS devices. I like using the UDID instead of the name, so I will use idevice_id from libimobiledevice to quickly get that.