I´m taking baby steps in iOS development and searching for a method to use logging in iOS.
I found these docs about logging with swift 3 : https://developer.apple.com/documentation/os/logging#1682426
The Docs say that the logs aren´t saved on disk. What is the typical way to get the logs and process the file?
put this file to your project
and if you need something to be logged, just use print function like
or
in your application's 'Documents' folder you could find 'log.txt' file which you could examine later.
while running my test application twice, the content looks like
if you don't like 'globals' define Log as singletone class
and use it like
Swift 3.0 version
Create a new swift file "TextLog.swift" in your project
Initialize the logger at bottom in the AppDelegate.swift file
Use it anywhere in the application like below