Post

Replies

Boosts

Views

Activity

How to collect logs from OSLog with swift?
Hi, I am trying to collect OSLog's logs using the OSLog framework, but I am not being able to access them. I've seen some examples that use something like this: swift import OSLog let myLogStore =try OSLogStore(scope: .currentProcessIdentifier) but when I try to run it throws: bash main.swift:5:20: error: argument labels '(scope:)' do not match any available overloads main.swift:5:20: note: overloads for 'OSLogStore' exist with these partially matching parameter lists: (URL: URL), (url: URL) I couldn't find any solution on google so far... I am running it on a Mac OS X's 10.15 with Darwin Kernel Version 19 and Swift version 5.2.2 Any guidance on how to collect logs by using this framework will be highly appreciated
8
1
7.9k
Mar ’21