I would like to record application log data in a file which iOS users can locate using the Files app and email to me in case of problems. Can I do this using the os_log functionality? The file path is defined as below:
let paths = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)
let documentsDirectory = paths[0]
let fileName = "\(Date()) CaptionEdit Logfile.txt"
let logFilePath = (documentsDirectory as NSString).appendingPathComponent(fileName)