in Sources/XCMetricsClient/Log Management/LogManager.swift [169:183]
func tagLogAsUploaded(logURL: URL) throws -> URL {
guard FileManager.default.fileExists(atPath: logURL.path) else { throw LogManagerError.notFound }
let directory = logURL.deletingLastPathComponent()
let pathExtension = logURL.pathExtension
let pathName = logURL.deletingPathExtension().lastPathComponent
let uploadedFileURL = directory.appendingPathComponent(pathName + "_UPLOADED." + pathExtension)
do {
try FileManager.default.moveItem(at: logURL, to: uploadedFileURL)
log("Successfully marked log as uploaded: \(uploadedFileURL)")
return uploadedFileURL
} catch {
log("Error (\(error.localizedDescription)) in marking log as uploaded: \(uploadedFileURL)")
throw error
}
}