Export logs from Apple Unified Logging System store
pod 'MLogStoreExporter', :git => "https://github.com/monsoir/MLogStoreExporter.git", :tag => 'v1.0.0'
import MLogStoreExporter
let exporter = MLogStoreExporter()
let file = try exporter.export(to: <#local path to log file#>, startDate: <#start date#>, overrideIfNeeded: true)
file
contains the url to dumped file
- It's caller's responsibility to take care of the thread or queue in which the export executes