how to collect logs from command line

I'm trying to collect logs on my mac from my app running on iPhone, but I always get an error. I use log collect as such:

% sudo log collect --device --output log.logarchive --last 1m

Archive successfully written to log.logarchive

% sudo log show --archive log.logarchive/

log: Could not open log archive: The log archive is corrupt or incomplete and cannot be read

so log show always claims the logs create by log collect are corrupt. I'm on maces monterey and iOS 15.3, and solution / tip? thanks

Post not yet marked as solved Up vote post of gshaviv Down vote post of gshaviv
1.9k views
Add a Comment

Replies

Try using:

log collect --device --start [starting time] --output [your subsystem]

where

starting time can be of the format '2020-06-22 9:41:00' for example