If you’re trying to catch log output from code you control, my recommendation is that you implement your own logging function that can redirect the log messages to wherever you want.
OTOH, if you’re trying to catch log messages generated by code you don’t control, that’s not going to work on current system. To quote from the WWDC session you referenced:
First off, all of the ASL logging APIs are now superseded by these new APIs and, therefore, those old APIs are deprecated.
There is an interesting edge case though. A new API for searching the log data is not going to be made public in this release.
What that means is that there’s no equivalent to asl search functionality.
Share and Enjoy
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"
It's extremely frustrating that Apple has gone through so much trouble creating a logging system that is space and time efficient and reliable but provides no reasonable way for users to mail an archive from iOS to the developer. The overhead of sysdiagnose is way too much for our testers, and we can't require them to connect their phone to a computer to deliver a log. For testing we generate high volumes of log data and we want our testers to easily send the data to us. It's too much data to spool to a log server without bogging down the iPhone. We use cocoaLumberjack right now because it's the only thing we can find that will do log rotation for us, and produce files we can email, but it's slow, it deadlocks, it doesn't flush reliably and loses data, and the log rotation algorithms are buggy and we end up with multi-gigabyte log files despite restricting the file size to 10 MB. If we could at least run the Unified Logging log command-line tool within our app through an API on ios (restricted to our own log data), then we could extract what we needed.
I second Papley's request. If my app crashes I want to attach the log file to the automatically generated crash report (I use Instabug.) Right now I am using SwiftyBeaver to a file destination that I have to manually rotate/delete as necessary if the log gets too big.