Browse Source

include more info in logs

pull/524/head
ryanzhao 2 months ago
parent
commit
ccbc819cc4
  1. 5
      Session/Settings/ShareLogsModal.swift
  2. 2
      SessionUtilitiesKit/General/Logging.swift

5
Session/Settings/ShareLogsModal.swift

@ -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)

2
SessionUtilitiesKit/General/Logging.swift

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

Loading…
Cancel
Save