Skip to content

Commit 9308cc1

Browse files
Improved attachment of log
1 parent 45c872e commit 9308cc1

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

AppCenter/AppCenterSDK+HiDrive.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,11 @@ private class AppCenterSDKDelegate : NSObject, MSCrashesDelegate {
163163
}
164164

165165
func attachments(with crashes: MSCrashes!, for errorReport: MSErrorReport!) -> [MSErrorAttachmentLog]! {
166-
return [
167-
MSErrorAttachmentLog.attachment(withText: self.applicationLog, filename: AppCenterConstants.crashLogFileName)
168-
]
166+
guard (self.isLogUploadEnabled == true) else {
167+
return []
168+
}
169+
170+
return [MSErrorAttachmentLog.attachment(withText: self.applicationLog, filename: AppCenterConstants.crashLogFileName)]
169171
}
170172

171173
private var applicationLog: String {

0 commit comments

Comments
 (0)