mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Improvements to logging (#457)
* Use `.info` logging in most places. * Remove old objc logging support. * Fix table view controller. * Make sure timeline item content isn't logged. * Add tests.
This commit is contained in:
@@ -53,7 +53,7 @@ class BugReportService: BugReportServiceProtocol {
|
||||
}
|
||||
|
||||
options.onCrashedLastRun = { [weak self] event in
|
||||
MXLog.debug("Sentry detected application was crashed: \(event)")
|
||||
MXLog.error("Sentry detected application was crashed: \(event)")
|
||||
self?.lastCrashEventId = event.eventId.sentryIdString
|
||||
}
|
||||
}
|
||||
@@ -79,11 +79,7 @@ class BugReportService: BugReportServiceProtocol {
|
||||
includeCrashLog: Bool,
|
||||
githubLabels: [String],
|
||||
files: [URL]) async throws -> SubmitBugReportResponse {
|
||||
MXLog.debug("submitBugReport")
|
||||
|
||||
var params = [
|
||||
MultipartFormData(key: "text", type: .text(value: text))
|
||||
]
|
||||
var params = [MultipartFormData(key: "text", type: .text(value: text))]
|
||||
params.append(contentsOf: defaultParams)
|
||||
for label in githubLabels {
|
||||
params.append(MultipartFormData(key: "label", type: .text(value: label)))
|
||||
@@ -140,6 +136,8 @@ class BugReportService: BugReportServiceProtocol {
|
||||
lastCrashEventId = nil
|
||||
}
|
||||
|
||||
MXLog.info("Feedback submitted.")
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -176,7 +174,7 @@ class BugReportService: BugReportServiceProtocol {
|
||||
|
||||
private func zipFiles(includeLogs: Bool,
|
||||
includeCrashLog: Bool) async throws -> [URL] {
|
||||
MXLog.debug("zipFiles: includeLogs: \(includeLogs), includeCrashLog: \(includeCrashLog)")
|
||||
MXLog.info("zipFiles: includeLogs: \(includeLogs), includeCrashLog: \(includeCrashLog)")
|
||||
|
||||
var filesToCompress: [URL] = []
|
||||
if includeLogs {
|
||||
@@ -213,7 +211,7 @@ class BugReportService: BugReportServiceProtocol {
|
||||
zippedFiles.append(zippedFileURL)
|
||||
}
|
||||
|
||||
MXLog.debug("zipFiles: totalSize: \(totalSize), totalZippedSize: \(totalZippedSize)")
|
||||
MXLog.info("zipFiles: totalSize: \(totalSize), totalZippedSize: \(totalZippedSize)")
|
||||
|
||||
return zippedFiles
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user