include more info in logs

pull/524/head
ryanzhao 4 years ago
parent f51651ce8e
commit ccbc819cc4

@ -57,8 +57,11 @@ final class ShareLogsModal : Modal {
// MARK: Interaction
@objc private func shareLogs() {
let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? ""
OWSLogger.info("[Version] iOS \(UIDevice.current.systemVersion) \(version)")
DDLog.flushLog()
let logFilePaths = AppEnvironment.shared.fileLogger.logFileManager.sortedLogFilePaths
if let latestLogFilePath = logFilePaths.last {
if let latestLogFilePath = logFilePaths.first {
let latestLogFileURL = URL(fileURLWithPath: latestLogFilePath)
self.dismiss(animated: true, completion: {
AttachmentSharing.showShareUI(for: latestLogFileURL)

@ -1,6 +1,8 @@
import SignalCoreKit
public func SNLog(_ message: String) {
#if DEBUG
print("[Session] \(message)")
#endif
OWSLogger.info("[Session] \(message)")
}

Loading…
Cancel
Save