3 ms·
Unless I'm misunderstanding your post, try something like this: $ log stream --level debug --process MyProcess > mylog.txt For lighter-weight logging, replace
by pjscott 6y ago
Unless I'm misunderstanding your post, try something like this:
$ log stream --level debug --process MyProcess > mylog.txt
For lighter-weight logging, replace "debug" with "info" or "default". If your program has debug symbols, you can also toss in the --source flag to add the filename and line number for each logging statement, if available.
The new logging is a significant improvement once you get used to it, IMO.
- jshier 6y agoGP meant from remote devices, like a phone, to somewhere the developer can see it, like a logging service. OSLog can't even log to a local file, making it fairly useless for in app logging even in testing, as there's no way to see your app's logs in the app, no?