Skip to content

Commit 984512d

Browse files
added attachment of crash logs
1 parent 204f29a commit 984512d

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

AppCenter/AppCenterSDK+HiDrive.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ class AppCenterSDK: NSObject {
3434
// MARK: - Private properties
3535

3636
fileprivate static var shared : AppCenterSDK?
37-
fileprivate var isInitialized = false
3837
fileprivate var configuration : Configuration?
3938

4039
// MARK: - Public properties
@@ -134,7 +133,13 @@ extension AppCenterSDK {
134133

135134
extension AppCenterSDK: MSCrashesDelegate {
136135

137-
private func applicationLog() -> String? {
136+
func attachments(with crashes: MSCrashes!, for errorReport: MSErrorReport!) -> [MSErrorAttachmentLog]! {
137+
return [
138+
MSErrorAttachmentLog.attachment(withText: self.applicationLog ?? "No Log found", filename: "SMFLogger.log")
139+
]
140+
}
141+
142+
private var applicationLog: String? {
138143
guard
139144
let description = Logger.logFilesContent(maxSize: AppCenterConstants.smfLogUploadMaxSize),
140145
(description.isEmpty == false) else {

0 commit comments

Comments
 (0)